|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
toshiba original risc 32-bit microprocessor arm core family tmpa901cmxbg semiconductor company
tmpa901cm tmpa901cm- 1 2010-07-29 *************************************************************************************************************** arm, arm powered, amba, ad k, arm9tdmi, tdmi, primecell, realview, thumb, cortex, coresight, arm9, arm926ej-s, embedded trace ma crocell, etm, ahb, apb, and keil are registered trademarks or trademarks of arm limited in the eu and other countries. **************************************************************************************************************** ? tmpa901cm tmpa901cm- 2 2010-07-29 - introduction - notes on the registers - ? this device has sfr (special function register) each ip (peripheral circuits). sfr is shown as following in this data book. ? a) ? ip lists ? ? ip lists show the register name , address and easy descriptions. ? ? 32bit address is assigned to all registers. it shows as ? [base address + ? (specific) address]. register name address (base+) description sample 0x0001 sample register ??? ??? ??? note1: case of this register (sample): 00000001 address because 00000000 address (hex)+0001 address (hex) note2: this register is sample register. there is not this data book. b) sfr (register) description ? ? basically, each register is structured 32 bit register. (there is a part of exception.) ? ? each description shows bit, bit symbol, type, reset value and description. bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:6] sample76 r/w 0y00 sample O 0y00: set to sample mode 0 0y01: set to sample mode 1 0y10: set to sample mode 2 0y11: set to sample mode 3 ??? ??? ??? ??? ??? note1: basically 3types. r/w(read/write) enable read/write ro(read only) enable read only wo(write only) enable write only ? there are exception types (usb device controlle r, usb host controller and sd host controller). please refer to those sections. note2: bit state description: hexadecimal: 0x00ff = 255 (decimal) binary: 0y0101 = 5 (decimal) note3: 1 word = 32 bit. base address = 0x0000_0000 a ddress = (0x0000_0000) + 0x0001 tmpa901cm tmpa901cm- 3 2010-07-29 32-bit risc microcontroller tmpa901cmxbg 1. overview and features tmpa901cm is a 32-bit risc microcontroller with a built-in arm9 tm _cpu core. tmpa901cmxbg is a 177-pin bga package product. features of the product are as follows: (1) arm926ej tm -s manufactured by arm is used. ? data cache: 16 kbytes ? instruction cache: 16 kbytes (2) maximum operating frequency: 200 mhz(@0 to 70 c) / 150mhz(@-20 to 85 c) (3) 7-layer multi bus system is used. ?bus master1: cpu data ? bus master2: cpu instruction ?bus master3: lcd controller ?bus master4: lcd data process accelerator ? bus master5: dma controller 1 ? bus master6: dma controller 2 ? bus master7: usb device controller (4) memory access ? built-in ram: 32 kbytes (can be used as program, data, and display memory) ? built-in rom: 16 kbytes (boot memory) ? it can be loaded to the built-in ram from usb . ? 4 gb linear access space (effective space: approximately 1.7 gb) ? separate bus system: ? ? ? external address 24 bits: a0-a23 ? ? ? external data bus 16bit d0-d15 (5) memory controller ? chip-select output: 2 channels ? chip-select exclusive for dram: 1 channel ? depending on the external pin selection, sdr (single data rate)-type sdram and ddr (double data rate) lvcmos_i/o type sdram can be supported (sstl_io type ddr sdram cannot be supported). ? support asynchronous static memory, but not support synchronous static memory. (6) 16-bit timer ? 6 channels 16-bit timers including 2 channel timers with pwm function. (7) synchronous serial bus interface: 1 channel ? supports spi mode / microwire mode (8) i 2 c bus interface: 1channel (9) uart: 2 channels ? channel 0: supports txd/rxd 2 wires uart/ supports irda1.0 mode. ? channel 1: supports txd/rxd/u1cts 3 wires uart tmpa901cm tmpa901cm- 4 2010-07-29 (10) usb device controller: 1 channel ? supports high communication speed (480mbps) (does not support low speed). ? supports 4 endpoints. ? end-point 0: control 64 bytes 1- fifo ? end-point 1: bulk (device host: in transfer) 512 bytes 2 -fifo ? end-point 2: bulk (host device: out transfer) 512 bytes 2- fifo ? end-point 3: interrupt 64 bytes 1- fifo (11) usb host controller: 1 channel ? supports full communication speed (12m bps) (does not su pport low speed) (12) i 2 s (inter-ic sound) interface: 2 channel channel 0 (for reception: 32-byte fifo 2) channel 1 (for transmission: 32-byte fifo 2) channel 0 and channel1 have common usage pins. (13) lcd controller ? supports 800 480 pixel size. ? supports tft/stn panels. ? for stn panels, 4/15/64 monochrome tones and 256/3375 color tones are supported. ? for tft panels, 16-bit color is supported. (14) lcd data process accelerator ? scaling function (expansion/reduction) ? filtering function (bi-cubic convolution) ? image blending function (supports font blending) (15) rtc (real-time clock) (16) melody/alarm generator ? supports output of 8 alarm sound patterns. (17) key-on wake up (key-input interrupt ) (18) 10-bit ad converter (with a built-in sa mple-and-hold circuit): 4 channels (19) supports touch-screen interfaces ? since a low-resistance switch is built in to the product, external components for horizontal/vertical swit ching can be deleted. (20) watchdog timer (21) oscillation frequency detector ? fail safe mode for high frequency oscillation (22) interrupt function: 21 types ? external 3types (7 pins): ex ternal interrupt(edge: rise an d fall, level: high and low) ? ? ? ? ? ? ? ? ? ? ? and key in ? internal : 18 types : 16bit timer 3, rtc 1, a/d converter 1 ? ? ? lcdc 1, nandfc 1, uart 2, ssp 1 ? ? i 2 c 1, usb device 1, usb host 1, i 2 s 1 ? ? lcdda 1, dmac 2, and wdt 1 (23) i/o port: 43 pins (24) dma controller: 8 channels tmpa901cm tmpa901cm- 5 2010-07-29 (25) nand-flash memory interface: 2 channels ? easy connection to nand-flash memory. ? supports both 2lc (2 values) and 4lc (4 values) types. ? supports 8-bit data bus and 512/2048-byte page size. ? built-in reed solomon operational circuit can correct 4 addresses and detect errors in more than 5 addresses. (26) standby function ? status of each pin in standby mode can be set bit-by-bit. ? built-in power management circuit (pmc) to prevent leakage current. (27) clock control function ? two blocks of built-in clock multiple circuit (pll) enables an external 10 to 25 mhz oscillator to supply various clocks as below: @ 0 to 70 c : usb device clock frequency of 480 mhz and clock frequency of 200 mhz to the cpu (cpu clock frequency is 192 mhz when usb is in use). @ 20 to 85 c : usb device clock frequency of 480mhz and clock frequency of 150 mhz to the cpu (cpu clock frequency is 144 mhz when usb is in use). ? ? clock gear function: a high-frequency clock can be changed within the range of fc to fc/8. ? ? real time clock (fs = 32.768 khz) (28) oscillation frequency detector (ofd) function (29) operating voltage ? internal dvcc1a and dvcc1b = 1.5v0.1v ? high-frequency oscillator and power supply for pll, dvcc1c = 1.5v0.1v ? external i/o dvccm for memory = 3.0v to 3.6v or 1.8v0.1v ? lcd and general external i/o dvcc3io = 3.0v to 3.6v ? external i/o avcc3ad for ad converter = 3.0v to 3.6v ? external i/o avdd3t/c for usb device2.0 = 3.15v to 3.45v ? external i/o avcc3h for usb host = 3.0v to 3.6v (30) dsu (jtag) function ? jtag supports of the arm9 core. (31) package ? 177-pin fbga : p-fbga177-1313-0.8c4 tmpa901cm tmpa901cm- 6 2010-07-29 figure 1.1 tmpa901cm block diagram arm926ej tm -s (bus master1&2) instruction cache 16kbyte bus interface data cache 16kbyte external bus interface dma controller (bus master5&6) lcd data process accelerator (bus master4) lcd controller (bus master3) usb device 2.0 controller (bus master7) a/d converter (4ch) touch screen i/f 16timer (6ch)/pwm nandf controller (2ch) usb host 1.1 controller i 2 s i/f (1ch) synchronous serial port (1ch) power management i 2 c i/f ( 1ch ) general purpose i/o key board matrix external interruption rtc/melody watch dog timer system controller pll clock gear apb tm bridge multi layer bus matrix1 internal ram0 16kb interrupt controller internal ram1 8kb boot rom 16kb dma1 dma2 multi layer bus matrix0 memory controller norf sram ddr sdramc memory controller norf sram sdr sdramc multi layer bus matrix2 multi layer bus matrix3 lcdc lcdda lcdc dma2 dma1 usb cpu data dma2 dma1 cpu data cpu data usb lcdda cpu inst. cpu data. cpu inst. cpu data. uart ( 2ch ) internal ram2 8kb (remap) ofd tmpa901cm tmpa901cm- 7 2010-07-29 2. pin configuration and functions this section provides a tmpa901cm, names of i/ o pins, and brief description of their functions. 2.1 pin configuration diagram (top view) figure 2.1.1 shows the tmpa901cm pin conf iguration(package: fbga177-p-1313-0.8c4 ) about the detail pin configuration, please refer to table 2.1.1 of next page a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a1 1 a12 a13 a14 a15 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 e1 e2 e3 e4 e5 e12 e13 e14 e15 f1 f2 f3 f4 f12 f13 f14 f15 g1 g2 g3 g4 g12 g13 g14 g15 h1 h2 h3 h4 h12 h13 h14 h15 j1 j2 j3 j4 j12 j13 j14 j15 k1 k2 k3 k4 k12 k13 k14 k15 l1 l2 l3 l4 l12 l13 l14 l15 m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14 m15 n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14 n15 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 figure 2.1.1 pin configuration diagram tmpa901cm top view (perspective view from the top) tmpa901cm tmpa901cm- 8 2010-07-29 table 2.1.1 pin configuration 1 2 3 4 5 6 7 8 a a1 dvsscom a2 sm3/xt2 a3 sm2/xt1 a4 pu3/ndd3/ld3 a5 pu2/ndd2/ ld2 a6 pu1/ndd1/ ld1 a7 pu0/ndd0/ ld0 a8 se5/a5 b b1 sp0/tck b2 pc2/pwe b3 pc3/mldalm/pwm 1out b4 pu7/ndd7/ld7 b5 pu6/ndd6/ ld6 b6 pu5/ndd5/ ld5 b7 pu4/ndd4/ ld4 b8 sf3/a11 c c1 sp4/rtck c2 sp1/tms c3 pc4/fsout/pwm3 out c4 pv3/ndcle/ld11 c5 pv2/ndale /ld10 c6 pv1/ndwen /ld9 c7 pv0/ndren /ld8 c8 sg0/a16 d d1 sp5/tdo d2 sp2/tdi d3 pc6/i2c0cl/usbp on d4 pv7/ld15 d5 pv6/ndrb/ ld14 d6 pv5/ndce1 n/ld13 d7 pv4/ndce0 n/ld12 d8 sg4/a20 e e1 dvcc3io e2 sp3/trstn e3 pc7/i2c0da/int9 e4 dvcc3io e5 dvsscom f f1 dvcc1b f2 dvcc3io f3 dvcc3io f4 dvcc3io g g1 dvsscom g2 dvsscom g3 dvsscom g4 dvsscom h h1 dvcc1a h2 dvcc1a h3 dvcc1a h4 dvcc1a j j1 avcc3ad j2 vrefh j3 vrefl j4 dvcc1b k k1 pd4/an4/mx k2 pd5/an5/my k3 avss3ad k4 dvcc3io l l1 pd6/inta(tsi)/ an6 l2 pd7/intb/an7 l3 dvcc3io l4 sm6/am0 m m1 dvcc3io m2 dvcc3io m3 pa0/ki0 m4 pa2/ki2 m5 dvsscom m6 avss3c m7 dvcc1a m8 dvcc3io n n1 sm4/resetn n2 pn0/u0txd/sir0o ut n3 pa1/ki1 n4 pa3/ki3 n5 dvsscom n6 avdd3c n7 avdd3t1 n8 avdd3t0 p p1 pn1/u0rxd/si r0in p2 sm7/am1 p3 dvcc1c p4 dvss1c p5 dvsscom p6 sr3/rext p7 avss3t2 p8 avss3t1 r r1 dvsscom r2 sm0/x1 r3 sm1/x2 r4 dvcc1c r5 sr4/vsens r6 avss3t3 r7 sr1/ddm r8 sr0/ddp 1 2 3 4 5 6 7 8 tmpa901cm tmpa901cm- 9 2010-07-29 table2.1.2 pin configuration 9 10 11 12 13 14 15 a9 se4/a4 a10 se3/a3 a11 se2/a2 a12 se1/a1 a13 se0/a0 a14 sl2/dmcap a15 dvsscom a b9 sg7/a23 b10 sf2/a10 b11 sf1/a9 b12 sf0/a8 b13 se7/a7 b14 se6/a6 b15 sl1/dmcd clkn b c9 sf7/a15 c10 sg6/a22 c11 sf6/a14 c12 sf5/a13 c13 sf4/a12 c14 sk0/dmcsdqm0/d mcddm0 c15 sl0/dmcd clkp/dmc sclk c d9 sg3/a19 d10 sg2/a18 d11 sg5/a21 d12 sg1/a17 d13 sk4/smcwen d14 sk1/dmcsdqm1/d mcddm1 d15 sl6/dmccl kin d e12 sk5/smcbe1n e13 sj5/dmcba1 e14 sb7/d15 e15 sb6/d14 e f12 sj6/dmccke f13 sj4/dmcba0 f14 sb5/d13 f15 sb4/d12 f g12 dvccm g13 sj3/dmccasn g14 sb3/d11 g15 sb2/d10 g h12 dvccm h13 sj2/dmcrasn h14 sb1/d9 h15 sb0/d8 h j12 dvccm j13 sj1/dmcwen j14 sl5/dmcddqs1 j15 sl4/dmcd dqs0 j k12 dvcc1a k13 sj0/smcoen k14 sa7/d7 k15 sa6/d6 k l12 dvcc1b l13 sh7/dmccsn l14 sa5/d5 l15 sa4/d4 l m9 dvcc3io m10 sn2/seljtag m11 avcc3h m12 sn1/seldvccm m13 sh4/smccs1n m14 sa3/d3 m15 sa2/d2 m n9 pb2/ko2/lc lfp n10 pb1/ko1/lclac n11 pt2/sp0do/i 2s0dati n12 pt4/u1txd/usbpon n13 sh3/smccs0n n14 sa1/d1 n15 sa0/d0 n p9 sn0/selme mc p10 pb0/ko0/lclcp p11 pt6/u1ctsn/ i2s0dato p12 pt1/sp0clk/i2s0cl k p13 pt0/sp0fss/i2s 0ws p14 pt3/sp0di/i2s0mc lk p15 sh2/smcb e0n p r9 avss3t0 r10 pb3/ko3/lcllp r11 pt7/x1usb r12 pt5/u1rxd/usboc r13 sn7/hdm r14 sn6/hdp r15 dvsscom r 9 10 11 12 13 14 15 tmpa901cm tmpa901cm- 10 2010-07-29 2.2 pin names and functions the names and functions of i/o pins are shown below. pins associated with memory are switched to either of two types of mpmc (mpmc0/1) depending on the status of the external pin ?selmemc?. table 2.2.1 pin names and functions (1/6) pin name number of pins input/output function remarks sa0 to sa7 d0 to d7 8 ? input/output data: data bus d0 to d7 for both mpmc0 and mpmc1 sb0 to sb7 d8 to d15 8 ? input/output data: data bus d8 to d15 for both mpmc0 and mpmc1 se0 to se7 a0 to a7 8 ? output address: address bus a0 to a7 for both mpmc0 and mpmc1 sf0 to sf7 a8 to a15 8 ? output address: address bus a8 to a15 for both mpmc0 and mpmc1 sg0 to sg7 a16 to a23 8 ? output address: address bus a16 to a23 for both mpmc0 and mpmc1 sh2 smcbe0n 1 ? output byte enable signal (d0 to d7) for norf/sram/mrom for both mpmc0 and mpmc1 sk5 smcbe1n 1 ? output byte enable signal (d8 to d15) for norf/sram/mrom for both mpmc0 and mpmc1 sh3 smccs0n 1 ? output chip select signal 0 for norf/sram/mrom for both mpmc0 and mpmc1 sh4 smccs1n 1 ? output chip select signal 1 for norf/sram/mrom for both mpmc0 and mpmc1 sh7 dmccsn 1 ? output output write-enable signal for sdr_sdram write-enable signal for ddr_sdram when using mpmc0 when using mpmc1 sj0 smcoen 1 ? output out-enable signal for norf/sram/mrom for both mpmc0 and mpmc1 sj1 dmcwen 1 ? output output write-enable signal for sdr_sdram write-enable signal for ddr_sdram when using mpmc0 when using mpmc1 sj2 dmcrasn 1 ? output output ? row address strobe signal for sdr_sdram row address strobe signal for ddr_sdram when using mpmc0 when using mpmc1 sj3 dmccasn 1 ? output output ? column address strobe signal for sdr_sdram column address strobe signal for ddr_sdram when using mpmc0 when using mpmc1 note: pin names "sa0 through sa7, ?, and sr0 through sr 4? are symbols used for c onvenience and are different from general-purpose port functions ?pa0 through pa7, ?, and pv0 through pv7." tmpa901cm tmpa901cm- 11 2010-07-29 table2.2.1 pin names and functions (2/6) pin name number of pins input/output function remarks sj4 dmcba0 1 ? output output ? bank0 strobe signal for sdr_sdram bank0 strobe signal for ddr_sdram when using mpmc0 when using mpmc1 sj5 dmcba1 1 ? output output ? bank1 strobe signal for sdr_sdram bank1 address strobe signal for ddr_sdram when using mpmc0 when using mpmc1 sj6 dmccke 1 ? output output ? clock-enable signal for sdr_sdram clock-enable signal for ddr_sdram when using mpmc0 when using mpmc1 sk0 dmcsdqm0 dmcddm0 1 ? output output byte enable signal (d0 to d7) for sdr_sdram data mask signal (d0 to d7) for ddr_sdram when using mpmc0 when using mpmc1 sk1 dmcsdqm1 dmcddm1 1 ? output output byte enable signal (d8 to d15) for sdr_sdram data mask signal (d8 to d15) for ddr_sdram when using mpmc0 when using mpmc1 sk4 smcwen 1 ? output write-enable signal for norf/sram/mrom for both mpmc0 and mpmc1 sl0 dmcsclk dmcdclkp 1 ? output output ? clock signal for sdr_sdram positive phase clock signal for ddr_sdram when using mpmc0 when using mpmc1 sl1 ? dmcdclkn 1 ? ? output ? not used negative phase clock signal for ddr_sdram when using mpmc0 when using mpmc1 sl2 dmcap 1 ? output output ? address/precharge signal for sdr_sdram address/precharge signal for ddr_sdram when using mpmc0 when using mpmc1 sl4 ? dmcddqs0 1 ? ? input/output ? not used data strobe signal (d0 to d7) for ddr_sdram when using mpmc0 when using mpmc1 sl5 ? dmcddqs1 1 ? ? input/output ? not used data strobe signal (d8 to d15) for ddr_sdram when using mpmc0 when using mpmc1 sl6 dmcclkin 1 ? input ? fb clock for sdr/ddr_sdram for both mpmc0 and mpmc1 note: pin names "sa0 through sa7, ?, and sr0 through sr 4? are symbols used for c onvenience and are different from general-purpose port functions ?pa0 through pa7, ?, and pv0 through pv7." tmpa901cm tmpa901cm- 12 2010-07-29 table2.2.1 pin names and functions (3/6) pin name number of pins input/output function remarks sm0 x1 1 ? input ? high-frequency oscillator connecting input pin sm1 x2 1 ? output ? high-frequency oscillator connecting output pin sm2 xt1 1 ? input ? low-frequency oscillator connecting input pin sm3 xt2 1 ? output ? low-frequency oscillator connecting output pin sm4 resetn 1 ? input ? reset: initializes tmpa901cm (with schmitt input and pull-up resistor) sm6 to sm7 am0 to am1 2 ? input ? startup mode input pins sn0 selmemc 1 ? input ? memory controller selection pin sn1 seldvccm 1 ? input ? memory-related operating voltage selection pin sn2 seljtag 1 ? input ? boundary scan switching pin sn6 hdp 1 ? input/output ? d+ for usb host data sn7 hdm 1 ? input/output ? d- for usb host data sp0 tck 1 ? input ? clock pin for jtag sp1 tms 1 ? input ? pin for jtag sp2 tdi 1 ? input ? data input pin for jtag sp3 trstn 1 ? input ? reset pin for jtag sp4 rtck 1 ? output ? clock output pin for jtag sp5 tdo 1 ? output ? data output pin for jtag sr0 ddp 1 ? input/output ? usb device pin (d+) sr1 ddm 1 ? input/output ? usb device pin (d-) sr3 rext 1 ? input ? connect to the vsens pin at 12 k ? sr4 vsens 1 ? input ? connect to the rext pin at 12 k ? note: pin names "sa0 through sa7, ?, and sr0 through sr4? are symbols used for convenience and are differentfrom general-purpose port functions ?pa0 through pa7, ?, and pv0 through pv7." tmpa901cm tmpa901cm- 13 2010-07-29 table2.2.1 pin names and functions (4/6) pin name number of pins input/output function remarks pa0 pa3 ki0 ki3 4 input input port a0 to a3: input ports key input ki0 to ki3: pins for key-on wake up 0 to 3 (with schmitt input and pull-up resistor) pb0 ko0 lclcp 1 output output output port b0: output ports key output ko0 : key out pins (open-drain can be set) lcd driver output pin pb1 ko1 lclac 1 output output output port b1: output ports key output ko1 : key out pins (open-drain can be set) lcd driver output pin pb2 ko2 lclfp 1 output output output port b2: output ports key output ko2 : key out pins (open-drain can be set) lcd driver output pin pb3 ko3 lcllp 1 output output output port b3: output ports key output ko3 : key out pins (open-drain can be set) lcd driver output pin pc2 pwe 1 output output port c2: output port external power source control output: this pin controls on/off of the external power source. the "h" level is output during regular operations, and the "l" level is output during standby mode. pc3 mldalm pwm0out 1 output output output port c3: output port melody alarm output pin timer pwm out port pc4 fsout pwm2out 1 output output output port c4: output port low-frequency output clock pin timer pwm out port pc6 i2c0cl 1 input/output input/output port c6: i/o port i2c clock i/o pc7 i2c0da int9 1 input/output input/output input port c7: i/o port i2c data i/o interrupt request pin9: an interrupt request pin that can program the rising/falling edge pd4 an4 mx 1 input input output port d4: input port analog input 4: ad converter input pin x-minus: x-connecting pin for touch panel pd5 an5 my 1 input input output port d5: input port analog input 5: ad converter input pin y-minus: y-connecting pin for touch panel pd6 an6 px inta(inttsi) 1 input input output input port d6: input port analog input 6: ad converter input pin x-plus: x-connecting pin for touch panel interrupt request pin a: an interrupt request pin that can program the rising/falling edge pd7 an7 py intb 1 input input output input port d7: input port analog input 7: ad converter input pin y-plus: y-connecting pin for touch panel interrupt request pin b: an interrupt request pin that can program the rising/falling edge tmpa901cm tmpa901cm- 14 2010-07-29 table2.2.1 pin names and functions (5/6) pin name number of pins input/output function remarks pn0 u0txd sir0out 1 input/output output output port n0: i/o port uart function 0 transmission data data output pin for irda1.0 pn1 u0rxd sir0in 1 input/output input input port n1: i/o port uart function 0 receive data data input pin for irda1.0 pt0 sp0fss i2s0ws 1 input/output input/output input/output port t0: i/o port fss pin for ssp0 i2s0 word select input/output pt1 sp0clk i2s0clk 1 input/output input/output input/output port t1: i/o port clock pin for ssp0 i2s0 serial clock input/output pt2 sp0do i2s0dati 1 input/output output input port t2: i/o port data output pin for ssp0 i2s0 receive serial data input pt3 sp0di i2s0mclk 1 input/output input output port t3: i/o port data input pin for ssp0 i2s0 master clock output for receive circuit tmpa901cm tmpa901cm- 15 2010-07-29 table2.2.1 pin names and functions (6/6) pin name number of pins input/output function remarks pt4 u1txd usbpon 1 input/output output output port t4: i/o port uart function 1 transmission data power on enable for usb host pt5 u1rxd usbocn 1 input/output input input port t5: i/o port uart function 1 receive data over current detect for usb host pt6 u1ctsn i2s1dato 1 input/output output output port t6: i/o port uart1 handshake (transmitter enable) i2s transmission serial data output pt7 x1usb 1 input/output input port t7: i/o port clock input pin for usb pu0 to pu7 ndd0 to ndd7 ld0 to ld7 8 input/output input/output input/output port u0 to port u7 : i/o port data buses for nandf memory data buses for lcd driver pv0 ndren ld8 1 input/output output output port v0: i/o port read enable for nand-flash data bus for lcd drive pv1 ndwen ld9 1 input/output output output port v1: i/o port write enable for nand-flash data bus for lcd driver pv2 ndale ld10 1 input/output output output port v2: i/o port address latch enable for nand-flash data bus for lcd driver pv3 ndcle ld11 1 input/output output output port v3: i/o port command latch enable for nand-flash data bus for lcd driver pv4 ndce0n ld12 1 input/output output output port v4: i/o port nand-flash0 chip select data bus for lcd driver pv5 ndce1n ld13 1 input/output output output port v5: i/o port nand-flash1 chip select data bus for lcd driver pv6 ndrb ld14 1 input/output input output port v6: i/o port nand-flash ready(1)/busy(0) input data bus for lcd driver pv7 ld15 1 input/output output port v7: i/o port data bus for lcd driver tmpa901cm tmpa901cm- 16 2010-07-29 pin name number of pins power pins function remarks dvcc1a 6 power supply vcc power supply for the main internal area dvcc1b 3 power supply vcc power supply for the internal b/u area dvcc1c 2 power supply vcc power supply for high-frequency clock/pll circuit dvss1c 1 power supply vss power supply fo r high-frequency clock/pll circuit dvcc3io 11 power supply vcc power supply for external i/o (general and lcd) dvccm 3 power supply vcc power supply for external i/o (for memory) avcc3ad 1 power supply vcc power supply for external i/o (a/dc) avss3ad 1 power supply vss power supply for external i/o (a/dc) vrefh 1 input reference voltage for a/d converter vrefl 1 input reference voltage for a/d converter avdd3tx 2 power supply vdd power supply for external i/o (usb device) avss3tx 4 power supply vss power supply for external i/o (usb device) avdd3c 1 power supply vdd power supply for external i/o (usb device) avss3c 1 power supply vss power supply for external i/o (usb device) avcc3h 1 power supply vcc power supply for external i/o (usb host) dvsscom 12 power supply shared vss power supply (gnd) tmpa901cm tmpa901cm- 17 2010-07-29 pin functions and initial values arranged by type of power supply - 1 (dvccm ) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial value after reset function/pin state sa0 to sa7 d0 to d7 on d0 to d7 / hz* sb0 to sb7 d8 to d15 on d8 to d15 / hz* se0 to se7 a0 to a7 address out / ?l? output sf0 to sf7 a8 to a15 address out / ?l? output sg0 to sg7 a16 to a23 address out / ?l? output sh2 smcbe0n smcbe0n out / ?h? output sk5 smcbe1n smcbe1n out / ?h? output sh3 smccs0n smccs0n out / ?h? output sh4 smccs1n smccs1n out / ?h? output sh7 dmccsn dmccsn out / ?h? output sj0 smcoen smcoen out / ?h? output sj1 dmcwen dmcwen out / ?h? output sj2 dmcrasn dmcrasn out / ?h? output sj3 dmccasn dmccasn out / ?h? output sj4 dmcba0 dmcba0n out / ?l? output sj5 dmcba1 dmcba1n out / ?l? output sj6 dmccke dmccken out / ?h? output sk0 dmcsdqm0 dmcddm0 when selmemc = 0 dmcsdqm0 out / ?l? output when selmemc = 1 dmcddm0 out / ?l? output sk1 dmcsdqm1 dmcddm1 when selmemc = 0 dmcsdqm1 out / ?l? output when selmemc = 1 dmcddm1 out / ?l? output dvccm sk4 smcwen smcwen out / ?h? output note 1: pin names "sa0 through sa7, ?, and sr0 th rough sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. the data bus pins (sa0-sa7, sb0-sb7, sc0-sc7, sd0-sd7) are always enabled as inputs. these pins must be tied exter nally (pulled up/down, etc.) to prevent flow-through current. tmpa901cm tmpa901cm- 18 2010-07-29 pin functions and initial values arranged by type of power supply ? 2 (dvccm) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial value after reset function/pin state sl0 dmcsclk dmcdclkp when selmemc = 0 dmcsclk out / clk output when selmemc = 1 dmcdclkp out / clk output sl1 dmcdclkn when selmemc = 0 invalid signal/ ?h? output when selmemc = 1 dmcdclkn out / inverted clk output sl2 dmcap dmcap out / ?l? output sl4 dmcddqs0 on dmcddqs0 / hz* sl5 dmcddqs1 on dmcddqs1 / hz* dvccm sl6 dmcclkin on dmcclkin input / hz note 1: pin names "sa0 through sa7, ?, and sr0 th rough sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed exte rnally. when ddr sdram is used, the dqs signals (dmcddqs0, dmcddqs1) are always enabled as inputs. these pins must be tied externally (pulled up/down, etc.) to prevent flow-through current. pin functions and initial values arranged by type of power supply ? 3 (dvcc3io) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial state after reset function/pin state sm2 xt1 oscillating sm3 xt2 oscillating sm4 resetn pu on resetn input / ?h? output sm6 am0 on am0 input / hz sm7 am1 on am1 input / hz sn0 selmemc on selmemc input / hz sn1 seldvccm on seldvccm input / hz sn2 seljtag on seljtag input / hz sp0 tck on tck input / hz sp1 tms on tms input/ hz sp2 tdi on tdi input / hz sp3 trstn on trstn input / hz sp4 rtck rtck out / clk output dvcc3io sp5 tdo tdo out / tdo output note 1: pin names "sa0 through sa7, ?, and sr0 through sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. the data bus pins for nand flash memory (ndd0-ndd7) are disabled as inputs in the initial state. tmpa901cm tmpa901cm- 19 2010-07-29 pin functions and initial values arranged by type of power supply ? 4 ? (dvcc3io) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial state after reset function/pin state pa0 to pa4 ki0 to ki4 pu on pa0 to pa4 input / ?h? output pb0 to pb3 ko0 to ko3 lclxx pb0 to pb3 out / ?h? output pc2 pwe pwe out / ?h? output pc3 mldalm pwm0out pc3 out / ?h? output pc4 fsout pwm2out pc4 out / ?l? output pc6 i2c0cl on pc6 input / hz pc7 i2c0da int9 on pc7 input / hz pn0 u0txd sir0out on pn0 input / hz pn1 u0rxd sir0in on pn1 input / hz pt0 sp0fss i2s0ws on pt0 input / hz pt1 sp0clk i2s0clk on pt1 input / hz pt2 sp0do i2s0dati on pt2 input / hz pt3 sp0di i2s0mclk on pt3 input / hz pt4 u1txd usbpon on pt4 input / hz pt5 u1rxd usboc on pt5 input / hz pt6 u1ctsn i2s1dato on pt6 input / hz pt7 x1usb on pt7 input / hz pu0 to pu7 ndd0 to ndd7 ld0 to ld7 on pu0 to pu7 / hz pv0 ndren ld8 on pv0 input / hz pv1 ndwen ld9 on pv1 input / hz pv2 ndale ld10 on pv2 input / hz pv3 ndcle ld11 on pv3 input / hz pv4 ndce0n ld12 on pv4 input / hz pv5 ndce1n ld13 on pv5 input / hz pv6 ndrb ld14 on pv6 input / hz dvcc3io pv7 ld15 on pv7 input / hz note 1: pin names "sa0 through sa7, ?, and sr0 through sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. and when usi ng external nand flash memory, the pins which are pv4(ndce0n), pv5(ndce1n) and so on should be processed by pull-up or be fixed the level externally. tmpa901cm tmpa901cm- 20 2010-07-29 pin functions and initial values arranged by type of power supply ? 5 ? (avcc3ad) power supply to be used typical pin name alternative function alternative function alternative function pull up/down input buffer initial state after reset function/pin state pd4 an4 mx off an4 input / hz pd5 an5 my off an5 input / hz pd6 an6 px inta(inttsi) pd* on an6 input / hz avdd3c/t pd7 an7 py intb on an7 input / hz note 1: pin names "sa0 through sa7, ?, and sr0 th rough sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. note 3: the pull-down resistor for pd6 is disabled after reset. pin functions and initial values arranged by type of power supply ? 6 ? (usb device) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial value after reset function/pin state sr0 ddp pd on dp input / ?l? output sr1 ddm pd on dm input / ?l? output sr3 rext rext input / hz avdd3c/t sr4 vsens vsens input / hz note 1: pin names "sa0 through sa7, ?, and sr0 th rough sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. the ddp and ddm signals for usb contain a pull-down resistor in phy. pin functions and initial values arranged by type of power supply ? 7 ? (usb host) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial value after reset function/pin state sn6 hdp on hdp input / hz avcc3h sn7 hdm on hdm input / hz note 1: pin names "sa0 through sa7, ?, and sr0 th rough sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. the hdp and hdm signals for usb contain a pull-down resistor in phy. pin functions and initial values arranged by type of power supply ? 8 ? (osc) power supply to be used typical pin name alternative function alternative function pull up/down input buffer initial value after reset function/pin state sm0 x1 oscillating dvcc1c sm1 x2 oscillating note 1: pin names "sa0 through sa7, ?, and sr0 th rough sr4" are symbols used for convenience and are different from general-purpose port functions "pa0 through pa7, ?, and pv0 through pv7." note 2: when the ?input buffer? column shows ?on?, the pin is enabled as an input in the initial state. if necessary, the pin should be processed externally. tmpa901cm tmpa901cm- 21 2010-07-29 3. operational description this chapter provides a brief description of the cpu circuitry of the tmpa901cm. 3.1 cpu this section describes the basic operations of the cpu of the tmpa901cm for each block. note that this document provides only an overview of the cpu block. please contact arm holdings for details of the operation. the tmpa901cm has a built-in 32-bit risc processor arm926ej-s tm manufactured by arm. the schematic diagram of the arm926ej-s tm core is shown below. figure 3.1.1 arm926ej-s tm core the tmpa901cm does not contain the functions shown below. 1. coprocessor i/f 2. embedded ice rt 3. tcm i/f 4. etm9 tm i/f 5. this cpu is under controlled by arm corporation and this version is r0p5. cpu core ( a rm926ej-s tm ) mmu data cache 16kb instruction cache 16kb wb amba tm ahb i/f for data amba ahb i/f for instruction tmpa901cm tmpa901cm- 22 2010-07-29 3.1.1 reset operation before resetting the tmpa901cm, make sure that the power supply voltage is within the operating range, oscillation from the internal oscillator is stable at 20 system clock cycles (0.8 s @ x1 = 25 mhz) at least, and the resetn input pin is pulled low. when the tmpa901cm is reset, the pll stops, the pll output is unselected, and the clock gear is set to top (1/1). the system clock therefore operates at 25 mhz (x1 = 25 mhz). if the reset instruction is accepted, the built-in i/o, i/o ports and other pins are initialized. reset the registers of the built-in i/o. (refer to the chapter on ports or on pin, for reset values.) although the original arm926ej-s tm allows selection of a vector location immediately after reset operation and endianness, they are already set as follows for this ic. endian boot vector little endian 0x00000000 note 1: the ic has a built-in ram, but its data may be lost due to the reset operation. initialize data in the built-in ram after the reset operation. note 2: although this ic cuts off some of the power supplies (dvcc1a, dvcc1c, avdd3tx,avdd3cx,avcc3h) to reduce standby current (pcm function), the reset operation may cause current penetration within the ic if it is executed while power to be cut off (dvcc1a, dvcc1c, avdd3tx, adcc3cx, avcc3h) is not being supplied. before exec uting the reset operation, make sure that the power supply to be cut off (dvcc1a, dvcc1c, av dd3tx, avdd3cx,avcc3h) is sufficiently stable. tmpa901cm tmpa901cm- 23 2010-07-29 3.1.2 exceptions the tmpa901cm includes 7 types of exception, and each of them has privileged processing mode. ? ? exception address note reset 0x00000000 undefined instruction execution 0x00000004 software interrupt (swi) instruction 0x00000008 it is used for operating system call. pre-fetch abort 0x0000000c instruction fetch memory abort data abort 0x00000010 data access memory abort irq 0x00000018 normal interrupt fiq 0x0000001c high-speed interrupt ? tmpa901cm tmpa901cm- 24 2010-07-29 3.1.3 multilayer ahb the tmp901cm uses a multilayer ahb bus system with 7 layers. arm926ej-s tm (bus master1&2) instruction cache 16kbyte bus interface data cache 16kbyte external bus interface dma controller (bus master5&6) lcd data process accelerator (bus master4) lcd controller (bus master3) usb device 2.0 controller (bus master7) a/d converter (4ch) touch screen i/f 16timer/pwm (6ch) nandf controller (2ch) usb host 1.1 controller i2s i/f (1ch) synchronous serial port (1ch) power management i2c i/f ( 1ch ) general purpose i/o key board matrix external interruption rtc/melody watch dog timer system controller pll clock gear apb bridge multi layer bus matrix1 internal ram0 16kb interrupt controller internal ram1 8kb boot rom 16kb dma1 dma2 multi layer bus matrix0 memory controller norf sram ddr sdramc memory controller norf sram sdr sdramc multi layer bus matrix2 multi layer bus matrix3 lcdc lcdda lcdc dma2 dma1 usb cpu data dma2 dma1 cpu data cpu data usb lcdda cpu inst. cpu data. cpu inst. cpu data. uart ( 2ch ) internal ram2 8kb (remap) ofd tmpa901cm tmpa901cm- 25 2010-07-29 3.2 jtag interface 3.2.1 overview the tmpa901cmxbg provides a boundary-scan inte rface that is compatible with joint test action group (jtag) specifications and uses the industry-standard jtag protocol (ieee standard 1149.1?1990 tmpa901cm tmpa901cm- 26 2010-07-29 3.2.2 signal summary and connection example the jtag interface signals are listed below. ? ? tdi jtag serial data input ? ? tdo jtag serial data output ? ? tms jtag test mode select ? ? tck jtag serial clock input ? ? trstn jtag test reset input ? ? rtck jtag test feedback serial clock output ? ? seljtag ice/jtag test select input (compatible with the enable signal) 0: ice 1: jtag the tmpa901cm supports debugging by connecting the jtag interface with a jtag-compliant development tool. for information about debugging, refer to the specification of the development tool used. note: in the case of not using jtag tool, fix the ntrst pin to gnd . in the case of using jtag tool, once set the ntrst pin to ?low? level to reset the jtag circuits, and then translate to ?high? level. pull-up resistance is built in some jt ag tools, the value of external pull-up resistance need to be considered according to the jtag tools. figure 3.2.1 example of connecti on with a jtag development tool mode setting pin seljtag operation mode 0 set this pin to 0 except for boundary scan mode. the tmpa901cm operates as regular debug mode. note: debugging is not available if the internal boot is carried out with am1 = 1 and am0 = 1. 1 the tmpa901cm operates in boundary scan mode tmpa901cmxbg jtag tool tdi tdo tms trstn tck rtck seljtag not e tmpa901cm tmpa901cm- 27 2010-07-29 3.2.3 what is boundary scan? with the evolution of ever-denser integrated circuits (ics), surface-mounted devices, double-sided component mounting on printed-circuit boards (pcbs), and set-in recesses, in-circuit tests that depend upon physical cont act like the connection of the internal board and chip has become more and more difficult to use. the more ics have become complex, the lager and more difficult the test program became. as one of the solutions, boundary-scan circuits started to be developed. a boundary-scan circuit is a series of shift regist er cells placed between the pins and the internal circuitry of the ic to which the said pins are connected. normally, these boundary-scan cells are bypassed; when the ic enters test mode, however, the scan cells can be directed by the test program to pass data along the shift register path and perfor m various diagnostic test s. to accomplish this, the tests use the six signals, tck, tms, tdi, tdo, rtck and trstn. the jtag boundary-scan mechanism (hereinafter referred to as jtag mechanism in the chapter) allows testing of the connections between the processor, the printed circuit board to which it is attached, and the other components on the circuit board. the jtag mechanism cannot test the processor alone. tmpa901cm tmpa901cm- 28 2010-07-29 3.2.4 jtag controller and registers the processor contains the following jtag controller and registers: instruction register boundary scan register bypass register device identification register test access port (tap) controller jtag basically operates to monitor the tms input signal with the tap controller state machine. when the monitoring starts, the tap controller determines the test functionality to be implemented. this includes both loading the jtag instruction register (ir) and beginning a serial data scan through a data register (dr), as shown in table 3.2.1. as the data is scanned, the state o f the tms pin signa l s each new data word and indicates the end of the data stream. the data register is selected according to the contents of the instruction register. 3.2.5 instruction register the jtag instruction register includes four shift register-based cells. this register is used to select the test to be performed and/or the test data register to be accessed. as listed in table 3.2.1, this instruction codes select eith er the bound ary scan register or the bypass register. table 3.2.1 jtag instruction register bit configuration instruction code (msb to lsb) instruction selected data register 0000 extest boundary scan register 0001 sample/preload boundary scan register 0100 to 1110 reserved reserved 0010 highz bypass register 0011 clamp bypass register 1111 bypass bypass register figure 3.2.2 shows the format of the instruction register. msb lsb figure 3.2.2 instruction register the instruction code is shifted out to the instruction register from the lsb. ? bypass register lsb tdo tdi msb figure 3.2.3 instruction register shift direction tmpa901cm tmpa901cm- 29 2010-07-29 the bypass register is 1 bit wide. when the tap controller is in the shift-dr (bypass) state, the data on the tdi pin is shifted in to the bypass register, and the bypass register output shifts to the date out on the tdo output pin. in essence, the bypass register is an alternative route which allows bypassing of board-level devices in the serial boundary-scan chain, which are not required for a specific test. the logical location of the bypass register in the boundary-scan chain is shown in figure 3.2.4 . use of the by pass register speeds up access to the boundar y scan register in the ic that remains active in the board-level test data path. td o board input ic package board td i bypass register boundary scan register pad cell board output tdi tdi tdo tdo tdo tdi tdo tdi figure 3.2.4 bypass register operation tmpa901cm tmpa901cm- 30 2010-07-29 3.2.6 boundary scan register the boundary scan register provides all the inputs and outputs of the tmpa901cm processor except some analog outputs and control signals. the pins of the tmpa901cm allow any pattern to be driven by scanning the data into the boundary scan register in the shift-dr state. incoming data to the processor is examined by enabling the boundary scan register and shifting the data when the bsr is in the capture-dr state. the boundary scan register is a single, 231-bi t-wide, shift register-based path containing cells connected to the input and output pads on the tmpa901cm. the tdi input is loaded to the lsb of the boundary scan register. the msb of the boundary scan register is shifted out on the tdo output. 3.2.7 test access port (tap) the test access port (tap) consists of the fi ve signal pins: trstn, tdi, tdo, tms and tck. these pins control a test by communicati ng the serial test data and instructions. as figure 3.2.5 shows, data is serially scanned into one of the three registers (instruction register, byp ass register or boundary scan register) on the tdi pin, or it is scanned out from one of these three registers on the tdo pin. the tms input controls the state transitions of the main tap controller state machine. the tck input is a special test clock that allows serial jtag data to be shifted synchronously, independent of any chip-specific or system clocks. figure 3.2.5 jtag test access port data on the tdi and tms pins are sampled on the rising edge of the tck input clock signal. data on the tdo pin changes on the falling edge of the tck clock signal. tck data is scanned out serially. tdo is sampled on the falling edge of tck. tms and tdi are sampled on the rising edge o f tck. data is scanned in serially. tms pin tdo pin 0 0 3 instruction register bypass register 115 boundary scan register 0 instruction register bypass register 115 boundary scan register 0 tdi pin 0 0 3 tmpa901cm tmpa901cm- 31 2010-07-29 3.2.8 tap controller the processor incorporates the 16-state tap controller stipulated in the ieee jtag specification. 3.2.9 resetting the tap controller the tap controller state machine can be put into the reset state by the following method. assertion of the trstn signal input (low) resets the tap controller. after the processor reset state is released, keep the tms input signal asserted through five consecutive rising edges of tck input. keeping tms asse rted maintains the reset state. 3.2.10 state transitions of the tap controller the state transition diagram of the tap controller is shown in figure 3.2.6. each arrow between states is labe led with a 1 or 0, indicating the logic value of tms that must be set up before the rising edge of tck to cause the transition. test-logic-reset 1 0 0 1 0 1 run-test/idle select-dr-scan 1 1 capture-dr 0 shift-dr 1 exit 1-dr 0 pause-dr 1 exit 2-dr 1 update-dr 0 1 0 0 1 select-ir-scan capture-ir 0 shift-ir 1 exit 1-ir 0 pause-ir 1 exit 2-ir 1 update-ir 0 1 1 00 1 0 0 0 figure 3.2.6 tap controller state transition diagram tmpa901cm tmpa901cm- 32 2010-07-29 the following paragraphs describe each of the controller states. the left column in figure 3.2.6 is the data column, and th e right column is the instruction column. the data column and instruction column reference the data register (dr) and the instruction register (ir), respectively. ? test-logic-reset when the tap controller is in the reset state, the device identification register is selected by default. the msb of the boundary scan register is cleared to 0 which disables the outputs. the tap controller remains in this state while tms is high. if tms is held low while the tap controller is in this state, then the controller moves to the run-test/idle state. ? run-test/idle in the run-test/idle state, the ic is put in test mode only when certain instructions such as a built-in self test (bist) instruct ion are present. for instructions that do not cause any activities in this state, all te st data registers selected by the current instruction retain their previous states. the tap controller remains in this state while tms is held low. when tms is held high, the controller moves to the select-dr-scan state. ? select-dr-scan this is a temporary controller state. here, the ic does not execute any specific functions. if tms is held low when the tap controller is in this state, the controller moves to the capture-dr state. if tms is held high, the controller moves to the select-ir-scan state. ? select-ir-scan this is a temporary controller state. here, the ic does not execute any specific functions. if tms is held low when the tap controller is in this state, the controller moves to the capture-ir state. if tms is held high, the controller returns to the test-logic-reset state. ? capture-dr in this state, if the test data register selected by the current instruction has parallel inputs, then data is parallel-l oaded into the shift portion of the data register. if the test data register does not have parallel inputs, or if data needs not be loaded into the selected data register, then the data register retains its previous state. if tms is held low when the tap controller is in this state, the controller moves to the shift-dr state. if tms is he ld high, the controller moves to the exit 1-dr state. tmpa901cm tmpa901cm- 33 2010-07-29 ? shift-dr in this controller state, the test data register connected between tdi and tdo shifts data out serially. when the tap controller is in this state, then it remains in the shift-dr state if tms is held low, or moves to the exit 1-dr state if tms is held high. ? exit 1-dr this is a temporary controller state. if tms is held low when the tap controller is in this state, the controller moves to the pause-dr state. if tms is held high, the controller moves to the update-dr state. ? pause-dr this state allows the shifting of the data register selected by the instruction register to be temporarily suspended. both the instruct ion register and the data register retain their current states. when the tap controller is in this state, then it remains in the pause-dr state if tms is held low, or moves to the exit 2-dr state. ? exit 2-dr this is a temporary controller state. when the tap controller is in this state, it returns to the shift-dr state if tms is held low, or moves on to the update-dr state if tms is held high. ? update-dr in this state, data is latched, on the rising edge of tck, onto the parallel outputs of the data registers from the shift register path. the data held at the parallel output does not change while data is shifted in the associated shift register path. when the tap controller is in this state, it moves to either the run-test/idle state if tms is held low, or the select-dr-scan state if tms is held high. ? capture-ir in this state, data is parallel-loaded into the instruction register. the data to be loaded is 0y0001. the capture-ir state is used for testing the instruction register. faults in the instruction register, if any, may be detected by shifting out the loaded data. when the tap controller is in this state, it moves to either the shift-ir state if tms is held low, or the exit 1-ir state if tms is high. ? shift-ir in this state, the instruction register is connected between tdi and tdo and shifts the captured data toward its serial output on the rising edge of tck. when the tap controller is in this state, it remains in the shift-ir state if tms is low, or moves to the exit 1-ir state if tms is high. tmpa901cm tmpa901cm- 34 2010-07-29 ? exit 1-ir this is a temporary controller state. when the tap controller is in this state, it moves to either the pause-ir state if tms is held low, or the update-ir state if tms is held high. ? pause-ir this state allows the shifting of the instruction register to be temporarily suspended. both the instruction register and the data register retain their current states. when the tap controller is in this state, it remains in the pause-ir state if tms is held low, or moves to the exit 2-ir state if tms is held high. ? exit 2-ir this is a temporary controller state. when the tap controller is in this state, it moves to either the shift-ir state if tms is held low, or the update-ir state if tms is held high. ? update-ir this state allows the instruction previously shifted into the instruction register to be output in parallel on the rising edge of tc k. then it becomes the current instruction, setting a new operational mode. when the tap controller is in this state, it moves to either the run-test/idle state if tms is low, or the select-dr- scan state if tms is high. tmpa901cm tmpa901cm- 35 2010-07-29 3.2.11 boundary scan order table 3.2.2 shows the boundary scan order with respect to the processor signals. tdi 1 (pc6) 2(pc7) ? 180(pc4) 181(pc2) tdo table 3.2.2 jtag scan order of the tmpa901cm processor pins no. pin name no. pin name no. pin name no. pin name no. pin name tdi 1 pc6 41 pt2 81 sh2 121 sk1 161 pv4 2 pc7 42 pt5 82 sj1 122 tsbrsv66 162 pu1 3 tsbrsv00 43 pb3 83 tsbrsv50 123 sl0 163 tsbrsv71 4 tsbrsv01 44 sm4 84 sb0 124 sl1 164 pu5 5 tsbrsv02 45 pa2 85 sj6 125 tsbrsv67 165 tsbrsv72 6 tsbrsv03 46 pt3 86 tsbrsv51 126 sl6 166 pv1 7 tsbrsv04 47 pa0 87 sa0 127 sl5 167 pu2 8 tsbrsv05 48 pt6 88 sb1 128 sk5 168 pv5 9 tsbrsv06 49 pt0 89 tsbrsv52 129 tsbrsv68 169 pu6 10 tsbrsv07 50 pa1 90 sa1 130 sl2 170 pv2 11 tsbrsv08 51 pt4 91 sh3 131 sl4 171 pu3 12 tsbrsv09 52 pt1 92 tsbrsv53 132 se6 172 tsbrsv73 13 tsbrsv10 53 pb1 93 sb2 133 sf4 173 pu7 14 tsbrsv11 54 pa3 94 sa2 134 se0 174 pv6 15 tsbrsv12 55 pb0 95 tsbrsv54 135 se7 175 pv3 16 tsbrsv13 56 pn0 96 tsbrsv55 136 sg1 176 tsbrsv74 17 tsbrsv14 57 pb2 97 tsbrsv56 137 se1 177 pc3 18 tsbrsv15 58 tsbrsv38 98 sb3 138 sf5 178 tsbrsv75 19 tsbrsv16 59 pn1 99 sa3 139 sg5 179 pv7 20 tsbrsv17 60 tsbrsv39 100 sh4 140 sf0 180 pc4 21 tsbrsv18 61 tsbrsv40 101 tsbrsv57 141 sg2 181 pc2 22 tsbrsv19 62 sm6 102 tsbrsv58 142 se2 tdo 23 tsbrsv20 63 sm7 103 tsbrsv59 143 sf6 24 tsbrsv21 64 pt7 104 sb4 144 tsbrsv69 25 tsbrsv22 65 sn0 105 sa4 145 sf1 26 tsbrsv23 66 sn1 106 sa5 146 sg6 27 tsbrsv24 67 tsbrsv41 107 sb5 147 se3 28 tsbrsv25 68 tsbrsv42 108 tsbrsv60 148 sg3 29 tsbrsv26 69 tsbrsv43 109 tsbrsv61 149 sf7 30 tsbrsv27 70 tsbrsv44 110 tsbrsv62 150 sf2 31 tsbrsv28 71 tsbrsv45 111 sa6 151 se4 32 tsbrsv29 72 tsbrsv46 112 sb6 152 tsbrsv70 33 tsbrsv30 73 tsbrsv47 113 sh7 153 sg7 34 tsbrsv31 74 sj2 114 tsbrsv63 154 sg4 35 tsbrsv32 75 sj4 115 sa7 155 sg0 36 tsbrsv33 76 tsbrsv48 116 tsbrsv64 156 sf3 37 tsbrsv34 77 sj0 117 sb7 157 se5 38 tsbrsv35 78 sj5 118 sk0 158 pu0 39 tsbrsv36 79 sj3 119 tsbrsv65 159 pu4 40 tsbrsv37 80 tsbrsv4 9 120 sk4 160 pv0 note: tsbrsv[00:75] of boundary scan order is described as reserved signal tmpa901cm tmpa901cm- 36 2010-07-29 3.2.12 instructions supported by the jtag controller cells this section describes the instructions supp orted by the jtag controller cells of the tmpa901cm. (1) extest instruction the extest instruction is used for exte rnal interconnect tests. the extest instruction permits bsr cells at output pins to shift out test patterns in the update-dr state and those at input pins to capture test results in the capture-dr state. typically, before extest is executed, the initialization pattern is shifted into the boundary scan register using the sample/p reload instruction. if the boundary scan register is not reset, indeterminate data will be transferred in the update-dr state and bus conflicts between ics may occur. figure 3.2.7 shows data flow when the extest instruct ion is select ed. core logic output tdo input tdi boundary scan path figure 3.2.7 test data flow when the extest instruction is selected the following steps describe the basic test procedure of the external interconnect test. 1. reset the tap controller to the test-logic-reset state. 2. load the instruction register with th e sample/preload instruction. this causes the boundary scan register to be connected between tdi and tdo. 3. reset the boundary scan register by shifting certain data in. 4. load the test pattern into the boundary scan register. 5. load the instruction register with the extest instruction. 6. capture the data applied to the input pin into the boundary scan register. 7. shift out the captured data while simultaneously shifting the next test pattern in. 8. send out the test pattern in the boundary scan register at the output on the output pin. repeat steps 6 to 8 for each test pattern. tmpa901cm tmpa901cm- 37 2010-07-29 (2) sample/preload instruction this instruction targets the boundary scan register between tdi and tdo. as its name implies, the sample/preload instruction provides two functions. sample allows the input and output pads of an ic to be monitored. while it does so, it does not disconnect the system logic from the ic pins. sample is executed in the capture-dr state. it is mainly used to capture the values of the ic?s i/o pins on the rising edge of tck during normal operation. figure 3.2.8 shows the flow of data for the sample phase of the sampl e /preload instruction. core logic output tdo input tdi boundary scan path figure 3.2.8 test data flow while the sample is selected preload allows the boundary scan register to be reset before any other instruction is selected. for example, prior to selection of the extest instruction, preload is used to load reset data into the boundary scan register. preload permits data shifting of the boundary scan register without interfering with the normal operation of the system logic. figure 3.2.9 shows the data flow for the preload phase of the sampl e/prelo ad inst ruction. output tdo input tdi boundary scan path core logic figure 3.2.9 test data flow while preload is selected tmpa901cm tmpa901cm- 38 2010-07-29 (3) bypass instruction this instruction targets the bypass regi ster between jtdi and jtdo. the bypass register provides the shortest serial path that bypasses the ic (between jtdi and jtdo) when the test does not require control or monitoring of the ic. the bypass instruction does not cause interference in the normal operation of the on-chip system logic. figure 3.2.10 shows the data flow through the bypass register when the byp a ss instruction is selected. tdo tdi bypass register 1 bit figure 3.2.10 test data flow w hen the bypass instruction is selected (4) clamp instruction the clamp instruction outputs the value that boundary scan register is programmed according to the preload instruction, and execute bypass operation. the clamp instruction selects the by pass register between tdi and tdo. (5) highz instruction the highz instruction disables the output of the internal logical circuits. when the highz instruction is executed, it places the 3-state output pins in the high-impedance state. the highz instruction also selects the bypass register between tdi and tdo. ? notes this section describes the cautions of the jtag boundary-scan operations specific to the processor. 1) the pr2 pin serves as an i/o pin. however, the pr2 pin does not support the capture function by using sample/preload instructions be cause the bsr is connected to the pin. 2) the jtag circuit can be released from the reset state by either of the following two methods: ? ? assert trstn, initialize the jtag ci rcuit, and then deassert trstn. ? ? supply the tck signal for 5 or more clock pulses to tck while pulling the tms pin high. tmpa901cm tmpa901cm- 39 2010-07-29 3.3 memory map the memory map of tmpa901cm is as follows: table 3.3.1 outline of access to internal area item outline of access cpu address width 32 bit cpu data bus width 32 bit internal operation frequency max 200mhz @ 0 to 70 c max 150mhz @ -20 to 85 c minimum bus cycle 1-f clk clock access (5ns at 200mhz) internal ram 32-bit 1-hclk clock access internal boot rom 32-bit 1-hclk clock access 32-bit,1-hclk clock access lcdc, lcdda, intc, dmac, usb device, usb host, i 2 s, nandfc, ssp,mpmc internal i/o 32-bit,2-pclk clock access a/d c, tsi, timer/pwm, pmc, i 2 c, uart, rtc, wdt, ofd, system c, pll cg, gpio tmpa901cm tmpa901cm- 40 2010-07-29 start address activation of the internal boot rom activation of external memory 0x0000_0000 remap area (8kb) 0x0000_2000 internal rom : 8kb+ 8kb 0x0000_4000 smccs0n external area (15.8mb) smccs0n 0x0100_0000 0x2000_0000 unused area external area (512mb) unused area 0x2100_0000 smccs0n external area (496mb) smccs0n 0x4000_0000 dmccsn external area (512mb) dmccsn 0x6000_0000 smccs1n external area (512mb) smccs1n 0x8000_0000 unused area external area (512mb) unused area 0xa000_0000 unused area external area (512mb) unused area 0xc000_0000 unused area external area (512mb) unused area 0xe000_0000 unused area external area (256mb) unused area 0xf000_0000 internal io-0 (apb) : 1m b internal io-0 (apb) : 1mb 0xf010_0000 unused area unused area 0xf080_0000 internal io-1 (apb port1/2) : 1m b internal io-1 (apb port1/2) : 1mb 0xf090_0000 internal io-2 (apb port2/2) : 1m b internal io-2 (apb port2/2) : 1mb 0xf0a0_0000 unused area unused area 0xf200_0000 internal io-3 (ahb+apb) : 16mb internal io-3 (ahb+apb) : 16mb 0xf300_0000 unused area unused area 0xf400_0000 internal io-4 (ahb) : 16mb internal io-4 (ahb) : 16mb 0xf600_0000 unused area internal i/o area (128mb) unused area 0xf800_0000 unused area unused area 0xf800_2000 internal ram-3 : 8kb(remap) internal ram-3 : 8kb(remap) 0xf800_4000 internal ram-0 : 16kb internal ram-0 : 16kb 0xf800_8000 internal ram-1 : 8kb internal ram-1 : 8kb 0xf800_a000 unused area internal memory area (128mb) unused area 0xffff_ffff note1: space between 0x0000_0000 and 0x0000_1fff (8kb) is a remap area, and the internal ram3 area will be accessed when remap is set to remap_on (access to f8000_2000 also leads to the ram3 area). note2: access to unused area is prohibited. figure 3.3.1 memory map (details of star t mode, external areas and internal area) tmpa901cm tmpa901cm- 41 2010-07-29 bus master and slave connection : access available, : access unavailable : don?t access cpu(d) cpu(i) lcdc lcdda dma1 dma2 usb address activation of the internal boot rom m1 m2 m3 m4 m5 m6 m7 0x0000_0000 remap area (8kb) 0x0000_2000 internal rom : 8kb+ 8kb 0x0000_4000 smccs0n external area (15.8mb) 0x0100_0000 0x2000_0000 unused area external area (512mb) ? 0x2100_0000 smccs0n external area (496mb) 0x4000_0000 dmccsn external area (512mb) 0x6000_0000 smccs1n external area (512mb) 0x8000_0000 unused area external area (1792mb) ? 0xf000_0000 internal io-0 (apb) : 1mb 0xf010_0000 unused area 0xf080_0000 internal io-1 (apb port1/2) : 1mb 0xf090_0000 internal io-2 (apb port2/2) : 1mb 0xf0a0_0000 unused area 0xf200_0000 internal io-3 (ahb+apb) : 16mb 0xf300_0000 unused area 0xf400_0000 internal io-4 (ahb) : 16mb please refer to next page. 0xf600_0000 unused area internal i/o area (128mb) ? 0xf800_0000 unused area ? 0xf800_2000 internal ram-3 : 8kb(remap) 0xf800_4000 internal ram-0 : 16kb dual port ram share with lcdda 0xf800_8000 internal ram-1 : 8kb share with ? usb host 0xf800_a000 unused area internal memory area(128mb) ? 0xffff_ffff note: usb host can access the area of 0xf800_8000 to 0xf800_9fff only. figure 3.3.2 memory map (details of start mode and bus master and slave connection) tmpa901cm tmpa901cm- 42 2010-07-29 start address end address details of internal io accessible master 0xf000_0000 0xf000_0fff sysctrl 0xf001_0000 0xf001_0fff wdt 0xf002_0000 0xf002_0fff pmc 0xf003_0000 0xf003_0fff rtc 0xf004_0000 0xf004_0fff timer01/pwm 0xf004_1000 0xf004_1fff timer23/pwm 0xf004_2000 0xf004_2fff timer45 0xf005_0000 0xf005_0fff pllcg 0xf006_0000 0xf006_0fff tsi 0xf007_0000 0xf007_0fff i 2 c0 0xf007_1000 0xf007_1fff reserved 0xf008_0000 0xf008_0fff adc 0xf009_0000 0xf009_0fff ofd 0xf00a_0000 0xf00a_0fff ebi 0xf00b_0000 0xf00b_0fff internal io (apb) 1mb lcdop m1(cpu data) 0xf080_0000 0xf080_ffff internal io (apb) 1mb port m1(cpu data) 0xf200_0000 0xf200_1fff uart0,1 note2) 0xf200_2000 0xf200_3fff ssp 0xf200_4000 0xf200_4fff reserved 0xf201_0000 0xf201_0fff nandfc 0xf202_0000 0xf202_0fff reserved 0xf203_0000 0xf203_0fff reserved 0xf204_0000 0xf204_0fff i 2 s 0xf205_0000 0xf205_0fff internal io (ahb+apb) 16mb lcdda m1(cpu data) m5(dmac1) m6(dmac2) 0xf400_0000 0xf400_0fff intc 0xf410_0000 0xf410_0fff dmac 0xf420_0000 0xf420_0fff lcdc 0xf430_0000 0xf430_0fff mpmc0 0xf431_0000 0xf431_0fff mpmc1 0xf440_0000 0xf440_0fff usb device 0xf450_0000 0xf450_f000 internal io (ahb) 16mb usb host m1(cpu data) internal io area note1: addresses that are assigned to the above table ar e reserved areas. reserved addresses must not access. note2: uart1 don?t support dma function. figure 3.3.3 memory map (details of internal registers) tmpa901cm tmpa901cm- 43 2010-07-29 3.3.1 boot mode a few boot modes are available for choice to this microprocessor depending on the external pin setting. 1. boot memory setting 2. external memory voltage setting (except nandf) 3. external memory controller setting 4. jtag pin setting mode setting pin resetn am1 am0 operation mode 0 1 start from the external 16-bit nor flash memory (internal boot_tom cannot be seen) 1 0 start from the external 32-bit nor flash memory (internal boot_tom cannot be seen) 1 1 boot (start from the internal boot rom) 0 0 test (this setting cannot be used) mode setting pin selvccm operation mode 0 memory-related control pins operate at 1.8 ? 0.1v (dvccm) 1 memory-related control pins operate at 3.3 ? 0.3v (dvccm) mode setting pin selmemc operation mode 0 only the sdr (single data rate) and m obile sdr types of sdram can be used. 1 only the mobile ddr (mobile double data rate) type of sdram can be used. mode setting pin seljtag operation mode 0 set ?0? to this pin except boundary scan mode. this setting can be used as regular debug mode note: debugging cannot be carried out during internal boot with am1 = 1 and am0 = 1. 1 this setting can be used as boundary scan mode tmpa901cm tmpa901cm- 44 2010-07-29 3.4 system controller 3.4.1 remapping function using the remapping function, this lsi can access the 8k-byte area of the built-in ram from two memory areas (0x0000_0000 to 0x0000_1fff and 0xf800_2000 to 0xf800_3fff). it turns on the remapping function by writing remap tmpa901cm tmpa901cm- 45 2010-07-29 ? ? ? ? ? ? ? ? boot mode remap_on multi mode 0x0000_0000 internal ram-3 8 kb (remap) 0x0000_2000 internal rom 16 kb cannot be used external area smccs0n 0x0000_4000 unused area unused area unused area 0x2100_0000 external area external area external area 0xf000_0000 internal io area internal io area internal io area 0xf800_0000 0xf800_2000 internal ram-3: 8 kb (remap) internal ram-3: 8 kb (remap) internal ram-3: 8 kb (remap) 0xf800_4000 internal ram-0: 16 kb internal ram-0: 16 kb internal ram-0: 16 kb 0xf800_8000 internal ram-1: 8 kb internal ram-1: 8 kb internal ram-1: 8 kb 0xf800_a000 unused area unused area unused area 0xf801_0000 unused area unused area unused area 0xffff_ffff note: space between 0x0000_0000 and 0x0000_1fff (8kb) is a remap area, and the built-in ram3 area will be accessed when remap is set to remap_on (access to 0xf8000_2000 also leads to the ram3 area). figure 3.4.2 ? memory map (details of boot mode and external areas) tmpa901cm tmpa901cm- 46 2010-07-29 3.4.2 register descriptions the system controller has the following register. 1. remap register bit bit symbol type reset value description [31:1] ? ? undefined read undefined. write as zero. [0] remap rw 0y0 remap setting [explanation] a. tmpa901cm tmpa901cm- 47 2010-07-29 3.5 clock controller 3.5.1 overview the clock controller is a circuit that contro ls the clock for the overall mcu. it has the following features: a. by using a clock multip lication circuit (pll), the clock controller supplies a clock of up to 200 mhz to the cpu. as a multiplied figure, x1, x6, or x8 can be dynamically selected. b. the clock gear contributes to reduction of the consumption current. c. writing to registers inside the clock controller is prohibited. transition of clock operation modes is as follows: figure 3.5.1 ? clock mode status transition note1: about pcm mode, please refer to chapter 26 (power management circuit). reset (f osch /1) cancel the reset status pll-off mode (f osch /gear value) interrupt instruction interrupt instruction cancel (interrutp) request halt mode (cpu stop) instruction pll-on mode ((6 or 8) f osch /gear value) pcm status (only some power is on) note1 reset on instruction tmpa901cm tmpa901cm- 48 2010-07-29 3.5.2 block diagrams fs low-frequency oscillator xt1 xt2 fs clock gear f osch x1 x2 clock circuit (pll) 6 or 8 2 4 fc/8 fc/4 fc/2 fc syscr2 tmpa901cm tmpa901cm- 49 2010-07-29 clock frequency input from the x1 and x2 pins is defined as f osch , clock frequency input from the xt1 and xt2 pins is defined as f s , and the clock selected in syscr1 tmpa901cm tmpa901cm- 50 2010-07-29 clock constraints are defined below. select a clock that meets these criteria for intended applications. table 3.5.1 clock constraints @ ta = 0 to 70 c lowest frequency highest frequency notes (a) f osch (high speed oscillator frequency) 10 mhz 27 mhz (b) f pll (pll output frequency) 60 mhz 200 mhz (c) f fclk (frequency for the cpu) 1.25 mhz 200 mhz (d) f usb (frequency for the usb) 24 mhz 24 mhz accuracy of 24mhz ? 100 ppm is required. (e) f usb (frequency for the usb) 48mhz 48mhz accuracy of 48mhz ? 100 ppm is required. (f) f s (low speed oscillator frequency) 30 khz 34 khz table 3.5.2 clock constraints @ ta = -20 to 85 c lowest frequency highest frequency notes (b) f osch (high speed oscillator frequency) 10 mhz 27 mhz (b) f pll (pll output frequency) 60 mhz 150mhz (c) f fclk (frequency for the cpu) 1.25 mhz 150 mhz (d) f usb (frequency for the usb) 24 mhz 24 mhz accuracy of 24mhz ? 100 ppm is required. (e) f usb (frequency for the usb) 48mhz 48mhz accuracy of 48mhz ? 100 ppm is required. (f) f s (low speed oscillator frequency) 30 khz 34 khz tmpa901cm tmpa901cm- 51 2010-07-29 the table below shows the examples of recommended uses that meet the criteria listed above. table 3.5.3 examples of recommended uses @ 0 to 70 c high speed oscillation: f osch pll output clock: f pll clock for cpu: f fclk clock for usb: f usb (1) usb required, maximum cpu: 192 mhz 24 mhz maximum of 192 mhz maximum of 192 mhz 24 mhz / 48mhz (2) usb required, maximum cpu: 200 mhz 25 mhz maximum of 200 mhz maximum of 200 mhz 24 mhz / 48mhz (input from the x1usb pin is required) (3) usb not required maximum cpu: 200 mhz 25 mhz maximum of 200 mhz maximum of 200 mhz ? table 3.5.4 examples of recommended uses @ -20 to 85 c high speed oscillation: f osch pll output clock: f pll clock for cpu: f fclk clock for usb: f usb (1) usb required, maximum cpu: 144 mhz 24 mhz maximum of 144 mhz maximum of 144 mhz 24 mhz / 48mhz (2) usb required, maximum cpu: 150 mhz 25 mhz maximum of 150 mhz maximum of 150 mhz 24 mhz / 48mhz (input from the x1usb pin is required) (3) usb not required maximum cpu: 150 mhz 25 mhz maximum of 150 mhz maximum of 150 mhz ? tmpa901cm tmpa901cm- 52 2010-07-29 3.5.3 operation descriptions 3.5.3.1 register descriptions the following lists the sf rs and their functions. register name address (base+) description reserved 0x000 reserved syscr1 0x004 system control register 1 syscr2 0x008 system control register 2 syscr3 0x00c system control register 3 syscr4 0x010 system control register 4 syscr5 0x014 system control register 5 syscr6 0x018 system control register 6 syscr7 0x01c system control register 7 syscr8 0x020 system control register 8 reserved 0x040 reserved reserved 0x044 reserved reserved 0x048 reserved reserved 0x04c reserved reserved 0x050 reserved clkcr5 0x054 clock control register 5 base address = 0xf005_0000 tmpa901cm tmpa901cm- 53 2010-07-29 1. syscr1 (system control register 1) bit bit symbol type reset value description [31:3] ? ? undefined read as undefined. write as zero. [2:0] gear r/w 0y000 clock gear programming (fc) 0y000: fc 0y001: fc/2 0y010: fc/4 0y011: fc/8 0y1xx: reserved [description] a. tmpa901cm tmpa901cm- 54 2010-07-29 2. syscr2 (system control register-2) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7] reserved r/w 0y0 read as undefined. write as zero. [6:2] ? ? undefined read as undefined. write as zero. [1] fcsel r/w 0y0 selection of the pll output clock 0y0: f osch 0y1: f pll end flag of the pll lockup counter read: 0y0: not end 0y1: end [0] lupflag ro 0y0 write: invalid [description] a. tmpa901cm tmpa901cm- 55 2010-07-29 3. syscr3 (system control register 3) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7] pllon r/w 0y0 pll operation control 0y0: off 0y1: on [6] ? ? undefined read as undefined. write as zero. [5] c2s r/w 0y1 pll constant value setting1 always write 0 [4:0] nd r/w 0y00111 pll constant value setting 2 0y00101 for x6, 0y00111 for x8 [description] a. tmpa901cm tmpa901cm- 56 2010-07-29 4. syscr4 (system control register 4) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:4] rs r/w 0y0111 pll constant value setting 3 x 8 x 6 140mhz or more less than 140mhz 140mhz or more less than 140mhz 0y0110 0y1001 0y0110 0y0111 [3:2] is r/w 0y10 pll constant value setting 4 always write 0y01 [1:0] fs r/w 0y01 pll constant value setting 5 x 8 x 6 140mhz or more less than 140mhz 140mhz or more less than 140mhz 0y01 0y10 0y01 0y10 [description] a. tmpa901cm tmpa901cm- 57 2010-07-29 5. syscr5 (system control register 5) bit bit symbol type reset value description [31:1] ? ? undefined read as undefined. [0] protect ro 0y0 protect flag 0y0: off 0y1: on [description] by setting a dual key to the syscr6 and syscr7 registers, protection (write operation to certain sfrs in the clock controll er) can be activated or released. [dual key] 1st-key : consecutive writing of 0x5a to syscr6 and 0xa5 to syscr7 2nd-key : consecutive writing of 0xa5 to syscr6 and 0x5a to syscr7 the protection status can be checked by reading syscr5 tmpa901cm tmpa901cm- 58 2010-07-29 6. syscr6 (system control register 6) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:0] p-code0 wo 0x00 protect code setting-0 [description] a. tmpa901cm tmpa901cm- 59 2010-07-29 9. clkcr5 (clock control register-5) bit bit symbol type reset value description [31:7] ? ? undefined read as undefined. write as zero. [6] reserved r/w 0y1 read as undefined. write as one. [5] ? ? undefined read as undefined. write as zero. [4] usbh_clken r/w 0y1 clock se lection for usb host controller 0y0 : disable 0y1 : enable [3] reserved r/w 0y1 write as one [2] sel_tim45 r/w 0y1 selection of a prescaler clock for timer45 0y0: fs (32.768 khz) clock 0y1: f pclk /2 [1] sel_tim23 r/w 0y1 selection of a prescaler for timer23 0y0: fs (32.768 khz) clock 0y1: f pclk /2 [0] sel_tim01 r/w 0y1 selection of a prescaler for timer01 0y0: fs (32.768 khz) clock 0y1: f pclk /2 [description] a. < usbh_clken > clock selection for usb host controller 0y0: disable 0y1: enable if the user desires to change a setting of the clock for usb host, the user must disable the output of the clock first. b. tmpa901cm tmpa901cm- 60 2010-07-29 3.5.4 system clock controller the system clock controller generates a clock to be supplied to the cpu core (f fclk ) and other built-in i/os (f hclk ). with the f osch or f pll clock as an input, it is possible to use syscr1 tmpa901cm tmpa901cm- 61 2010-07-29 count up at f osch during lock-up tmpa901cm tmpa901cm- 62 2010-07-29 3.6 boot rom tmpa901cm contains a boot rom for loadin g a user program to the internal ram. the following loading methods are supported. 3.6.1 operation modes tmpa901cm has two operation modes: extern al memory mode and internal boot rom mode. either mode is selected in accordance with the am1 and am0 pin status when resetn is asserted. (1) external memory mode: after reset, the cpu fetches instructions from external memory and executes them. (2) internal boot rom mode: after reset, the cpu fetches instructions from the internal boot rom and executes them. according to the program in the internal boot rom, a user program is transferred to the internal ram via usb communication and branches into the program in the internal ram. this triggers the user program to boot. table 3.6.2 shows the overview of boot operation. t able 3.6.1 operation modes mode setting pins resetn am1 am0 operation mode 0 1 start from the external bus memory (with 16-bit bus) 1 0 start from the external bus memory (with 32-bit bus) 1 1 boot (start from the internal boot rom) 0 0 test (setting prohibited) table 3.6.2 overview of boot operation loading priority source i/f destination operation after loading 1 usb host such as a pc usb internal ram branch into the internal 8 kb_ram 0x0000_0000 tmpa901cm tmpa901cm- 63 2010-07-29 3.6.2 hardware specifications of the internal boot rom (1) memory map figure 3.6.1 shows a memory map of boot mode. the internal boot rom co nsists o f 16 kb rom and is assigned to addresses from 0x0000_0000 to 0x0000_3fff. 0x0000_0000 internal boot rom/ram: 8 kb (remap) remap area 0x0000_2000 internal boot rom: 8 kb 0x0000_4000 external area 0xf000_0000 internal io-0(apb) : 1 mb 0xf080_0000 internal io-1(apb port1/2) : 1 mb 0xf090_0000 internal io-2(apb port2/2) : 1 mb 0xf200_0000 internal io-3(ahb+apb) : 16 mb 0xf400_0000 internal io-4(ahb) : 16 mb internal io area (128 mb) 0xf800_0000 0xf800_2000 internal ram-3 : 8 kb(remap) 0xf800_4000 internal ram-0: 16 kb 0xf800_8000 internal ram-1: 8 kb 0xf800_a000 0xffff_ffff unused area internal memory area (128 mb) figure 3.6.1 memory map of boot mode 4gb tmpa901cm tmpa901cm- 64 2010-07-29 (2) the boot rom elimination function after the boot sequence is executed in boot mode, remapping is executed and the internal boot rom area changes into ram. ? ? ? ? ? ? ? ? boot mode remap_on multi mode 0x0000_0000 internal ram-3 8 kb (remap) 0x0000_2000 internal rom 16 kb cannot be used external area smccs0n 0x0000_4000 unused area unused area unused area 0x2100_0000 external area external area external area 0xf000_0000 internal io area internal io area internal io area 0xf800_0000 0xf800_2000 internal ram-3: 8 kb (remap) internal ram-3: 8 kb (remap) internal ram-3: 8 kb (remap) 0xf800_4000 internal ram-0: 16 kb internal ram-0: 16 kb internal ram-0: 16 kb 0xf800_8000 internal ram-1: 8 kb internal ram-1: 8 kb internal ram-1: 8 kb 0xf800_a000 unused area unused area unused area 0xffff_ffff note: space between 0x0000_0000 and 0x0000_1fff (8 kb) is a remap area, and the internal ram3 area will be accessed when remap is set to remap_on (access to f8000_2000 also leads to the ram3 area). figure 3.6.2 ? memory map (details of boot mode and external area) tmpa901cm tmpa901cm- 65 2010-07-29 3.6.3 outline of boot operation usb can be selected as the transfer source of boot operation. after reset, operation of the boot program on the internal boot rom follows the flow chart shown in figure 3.6.3. in any case, the user program is transferred from the source to the internal ram, and br anche d into the internal ram. the internal ram is used in the same manner regardless of the transfer source as shown in figure 3.6.4. note: when downloading the user program via usb, a usb device driver and special application software are needed on the pc. figure 3.6.3 flow chart of internal boot rom operation start branch into the internal ram 0x0000_0000 yes download via usb no usb check tmpa901cm tmpa901cm- 66 2010-07-29 figure 3.6.4 use of the inte rnal ram of the boot program within the internal ram, the area between 0xf800_8000 and 0xf800_9fff is used as work and stack areas for executing the boot program. therefore, the maximum size of the user program that can be loaded to the internal ram is 24 kb. within 24 kb of the user program area between 0xf800_2000 and 0xf800_7fff, the vector and program are written in an 8 kb space between 0xf800_2000 and 0xf800_3fff. the boot program loads user program into th e user program area in the internal ram. the boot program is loaded into the work space in the internal ram. the loaded program executes remapping. when the remap function is turned on, the 8 kb space between 0xf800_2000 and 0xf800_3fff can be accessed from the sp ace between 0x0000 _0000 and 0x0000_1fff. refer to the chapter on the ?system cont roller? for details of this function. the boot program will branch to 0x0000_000 0 of the last remapped ram area (reset vector). as shown in fig. 3.6.4, remapping assigns another vector addresses to the rom area. ex. before remapping 0xf800_ 2000 0xf800_2018 after remapping 0x0000_0000 (reset vector) 0x0000_0018 (irq vector) therefore, the vector addresses to jump after running boot program must be assigned to 0xf800_2000 and later addresses. 0xf800 2000 user program load area (16kb) 0xf800 4000 boot program work space and stack space area (8 kb) 0xf800 9fff 0xf800 8000 after remap before remap 0x0000 0000 boot program work space and stack space area (8 kb) 0xf800 4000 0xf800 9fff 0xf800 8000 user program load area: vector area included (8kb) user program load area (16kb) boot rom (16kb) 0x0000 0000 0xf800 2000 user program load area: vector area included (8kb) user program load area: vector area included (8kb) ? ? ? ? ? ? vecto r in rom vecto r in ram vecto r in ram vecto r in ram shadow area (same data) tmpa901cm tmpa901cm- 67 2010-07-29 3.6.3.1 example of usb boot in boot from usb, user program vector is downloaded to 8kb of remap area (0xf800_2000 to 0xf800_3fff), program is down loaded to 16kb of internal ram area (0xf800_4000 to 0xf800_7fff). boot program remaps the area, and the data of remap area is reflected to vector area (0x0000_0000 to 0x 0000_1fff). when the address jumps to 0x0000_0000 address, user program is started. remap area internal ram vector area 0x0000_0000 0xf800_2000 0xf800_4000 note: execution address of vector is 0x0000_0000. however, 0xf800_2000 and later addresses must be assigned as the original data area. data of remapped area is reflected 0x0000_0000 to 0x0000_1fff address. tmpa901cm tmpa901cm- 68 2010-07-29 (1) cpu status and port settings arm926ej tm -s starts in supervisor mode after reset, and the boot program executes all programs in supervisor mode without any mode changes. no port settings are required as ports used in the boot program are all dedicated pins. table 3.6.3 port settings for the boot program boot port i/o pin configuration by the boot program ddp input/output usb ddm input/output no settings required as dedicated pins are used. (2) control register settings by the boot program table 3.6.4 shows the control registers of in tern al circuits that are set by the boot program. after the boot seq u ence, create a program while taking these setting values into account. the stack pointer and the internal ram including the area between 0xf800_8000 and 0xf800_9fff remain in the state after execut ion of the boot program. please reset them as appropriate before using. table 3.6.4 list of sfrs register name setting value description syscr1 0x0002 clock gear = 1/4 syscr2 0x0002 syscr3 0x0087 syscr4 0x0065 pll clock is used ( 8) syscr8 0x0030 clock for usb device controller remap 0x0001 remap on important notes timer0 is used in the boot sequence. (then timer0control tmpa901cm tmpa901cm- 69 2010-07-29 3.6.4 download via usb (1) connection example figure 3.6.5 shows an example of usb connection (assuming that nor flash is program memory) figure 3.6.5 usb conne c tion example (2) overview of the usb interface specifications set the oscillation frequency for the x1 and x2 pins to 24.00 mhz ( 100 ppm) when booting using usb. the usb of this microcontroller supports high-speed communications. however, if the usb host does not support high-speed comm unications (usb 1.1 or older), full-speed communications will be carried out. (the boot rom function does not support clock supply from the usb clock pin x1usb.) (for cautions on using the usb, refer to the chapter on the usb.) although there are four types of usb transfer, the following two types are used for the boot function. table 3.6.5 transfer types used by the boot program transfer type description control transfer used for transmitting standard requests and vendor requests. bulk transfer used for responding to vendor requests and transmitting a user program. pc usb host ? ? x1 x2 ddp ddm am0 data am1 address tmpa901cm ctl data address nor flash 24mhz tmpa901cm tmpa901cm- 70 2010-07-29 the following shows an overview of the usb communication flow. figure 3.6.6 overview of the overall flow host (pc) connection recognition send get_descriptor. send descriptor information. data transfer send a microcontroller information command. send microcontroller information data. send the user program transfer start command. send a user program. convert motorola s3 format data. check data transfer data transfer end processing transmit the transfer result command over 2 seconds after completion of user program transfer. check data send the transfer result command. send transfer result data. tmpa900cm create microcontroller information data. load the received data into the specified ram address area. create microcontroller inf o rm a ti o n da t a . (if the received data cannot be loaded into ram for some reason, the data is discarded everytime it is received.) create transfer result data. control transfe r bulk transfe r [legends] branch to the internal ram tmpa901cm tmpa901cm- 71 2010-07-29 the following shows the connection of vendor class request. the table below shows the setup command data structure. table 3.6.6 setup command data structure field value description bmrequesttype 0x40 d7 0y0: host to device d6-d5 0y10: vendor d4-d0 0y00000: device brequest 0x00, 0x02, 0x04 0x00: microcontroller information 0x02: user program transfer start 0x04: user program transfer result wvalue 0x00~0xffff unique data number (not used by the microcontroller) windex 0x00~0xffff write size used when starting user program transfer (user program transfer size) wlength 0x0000 fixed the table below shows vendor request commands. table 3.6.7 vendor request commands command vendor request value operation notes microcontroller information command 0x00 device sends microcontroller information. microcontroller information data is sent by bulk in transfer after the setup stage is completed. user program transfer start command 0x02 device starts receiving user program. set the transfer size of a user program in windex. the user program is received by bulk out transfer after the setup stage is completed. user program transfer result command 0x04 device sends the transfer result. transfer result data is transmitted as bulk data after the setup stage is completed. tmpa901cm tmpa901cm- 72 2010-07-29 the table below shows stan dard request commands. table 3.6.8 standard request commands standard request response get_status not supported clear_feature not supported set_feature not supported set_address supported get_descriptor supported set_descriptor not supported get_configration not supported set_configration supported get_interface not supported set_interface not supported synch_frame ignored the table below shows information to be returned by get_descriptor. table 3.6.9 replies to get_discriptor device descriptor field value description blength 0x12 18 bytes bdescriptortype 0x01 device descriptor bcdusb 0x0200 usb version 2.0 bdeviceclass 0x00 device class not in use bdevicesubclass 0x00 sub command not in use bdeviceprotocol 0x00 protocol not in use bmaxpacketsize0 0x40 ep0 maximu m packet size is 64 bytes. idvendor 0x0930 vendor id idproduct 0x6504 product id (0) bcddevice 0x0001 device version (v0.1) imanufacturer 0x00 index value of string descriptor indicating the manufacturer name iproduct 0x00 index value of string descriptor indicating the product name iserialnumber 0x00 index value of st ring descriptor indicating the product serial number bnumconfigurations 0x01 there is one configuration. * the descriptor information to be returned to the usb host should be modified as required by each application. tmpa901cm tmpa901cm- 73 2010-07-29 configuration descriptor field value description blength 0x09 9 bytes bdescriptortype 0x02 configuration descriptor wtotallength 0x0020 total length (32 bytes) obtained by adding each configuration and endpoint descriptor bnuminterfaces 0x01 there is one interface. bconfigurationvalue 0x01 configuration number 1 iconfiguration 0x00 index value of string descriptor indicating the configuration name (not in use) bmattributes 0x80 bus power maxpower 0x31 maximum power consumption (49 ma) interface descriptor field value description blength 0x09 9 bytes bdescriptortype 0x04 interface descriptor binterfacenumber 0x00 interface number 0 balternatesetting 0x00 alternate setting number 0 bnumendpoints 0x02 there are two endpoints. binterfaceclass 0xff unique device binterfacesubclass 0x00 binterfaceprotocol 0x50 bulkonly protocol iiinterface 0x00 index value of string descriptor indicating the interface name (not in use) * the descriptor information to be returned to the usb host should be modified as required by each application. tmpa901cm tmpa901cm- 74 2010-07-29 endpoint descriptor (when the usb host supports usb2.0) field value description tmpa901cm tmpa901cm- 75 2010-07-29 the table below shows information replied to the microcontroller information command. table 3.6.10 information replied to t he microcontroller information command microcontroller information ascii code tmpa900cm 0x54,0x4d,0x50,0x41,0x39,0x30,0x30, 0x43,0x4d,0x20,0x20,0x20,0x20,0x20,0x20 note: produnct name in the microcontroller informati on includes 6 spaces at the end of the product name. note: produnct name in the microcontroller informati on is described tmpa900cm as tmpa900cmxbg series. the table below shows information replied to the transfer result command. table 3.6.11 information returned by the transfer result command transfer result value error condition normal termination 0x00 user program not received 0x02 the user program trans fer result is received without the user program transfer start command being received first. received file not in motorola s3 format 0x04 the first data of a user program is not s (0x53). size of a received user program being larger than specified 0x06 the size of a received user program is larger than the value set in windex of the user program transfer start command. inadequate download address 0x08 the user program do wnload address is not in the specified area. protocol error or errors other than above 0x0a the user program transfer st art or user program transfer result command is received first. a checksum error is detected in the motorola s3 file. a record type error is detected in the motorola s3 file. an error is detected in the dma transfer. tmpa901cm tmpa901cm- 76 2010-07-29 (3) description of the usb boot program operation the boot program transfers data in motorola s3 format sent from the pc to the internal ram. the user program starts operating after data transfer is completed. the start address of the program is 0x0000 _0000. please refer to section 3.6.3 for details. this function enable s users to cust omize on-board programming control. a. operation procedure 1. connect the usb cable. 2. set both the am0 and am1 pins to 1 and reset the microcontroller. 3. after recognizing usb connection, the pc checks the information on the connected device using the get_descriptor command. 4. the pc sends the microcontroller information command by command transfer (vendor request). 5. upon receiving the microcontroller information command, the boot program prepares microcontroller information in ascii code. 6. the pc checks the mi crocontroller information data. 7. the pc sends the microcontroller transfer start command by command transfer (vendor request). after the setup stage is completed, the pc transfers the user program by bulk out transfer. 8. after the user program has been transferred, the pc waits for over two seconds and then sends the user program transfer result command by command transfer (vendor request). 9. upon receiving the user program transfer result command, the boot program prepares for transmission of the transfer result value. 10. the pc checks the transfer result. 11. if the transfer results in failure, the boot program starts the error processing routine and will not automatically recover from it. in this case, terminate the device driver on the pc and retry from step 2. b. notes on the user program format (binary) 1. after receiving the checksum of a reco rd, the boot program waits for the start mark (0x53 for ?s?) of the next record. even if data other than 0x53 is transmitted between records, it will be ignored. note: in usb transfers, the maximum object size that can be transferred is 64 kb since the write size is set by windex within the address range of 0x0000h to 0xffff. tmpa901cm tmpa901cm- 77 2010-07-29 3.6.5 usage note following are the note when use the boot rom. 1. using timer0 timer0 is used in the boot sequence. (then timer0control tmpa901cm tmpa901cm- 78 2010-07-29 3.7 interrupts 3.7.1 functional overview ? supports 21 interrupt sources. ? assigns 32 levels of fixed hardware (h/w) priorities to the interrupt sources (to be used if multiple interrupt requests of the same software priority level are made simultaneously). ? enables to set 16 levels (0 to15) of software (s/w) interrupt priority for each interrupt source. ? enables to mask hardware and software priority levels. ? supports two types of interrupt requests: normal interrupt request (irq) and fast interrupt request (fiq). ? enables to gene rate software interrupts. 3.7.2 block diagram figure 3.7.1 block diagram arm926 ej tm -s ahb bus nvicfiq nvicirq vicintsource [31:0] interrupt request circuit fiqstatus [31:0] interrupt vector 31 interrupt vector 0 interrupt vector 1 ? ? : ? ? ? ? : ? ? : ? ? ? ? : irqstatus [31:0] fiq interrupt circuit (non vectored ) logic irq31 vectaddr31 irq1 vectaddr1 irq0 vectaddr0 irq vector address priority order circuit ahb interface and register tmpa901cm tmpa901cm- 79 2010-07-29 ? logic circuit of interrupt request figure 3.7.2 status flag relation vicintenable [31:0] vicintsource [31:0] vicintselect [31:0] vicsoftint [31:0] vicfiqstatus [31:0] vicirqstatus [31:0] vicrawinterrupt [31:0] tmpa901cm tmpa901cm- 80 2010-07-29 3.7.3 operational description for interrupt control(vic), fiq (fast interrupt request) and irq (interrupt request) are available. the tmpa901cm only has one fiq source. fiq is a low- latency interrupt and has the highest priority level. in handling fiq, inte rrupt service routine can be executed without checking which interrupt source is used. tmpa901cm tmpa901cm- 81 2010-07-29 ? interrupt vector flowchart end execute the interrupt service routine (isr) clear the interrupt request of peripheral circuit. *in case of ?software interruption? is generated, clear the vicsoftclear register. write the vicaddress register. (clear hardware priority control of vic) read the vicaddress register so that other higher priority interruptions than current interruption can be re-enabled if necessary, ?push? the register setting and etc. * in case of using multiple interruption, set to ?enable? for enable register in cpu. return from the interrupt service routine (isr). cpu branches to 0x00000018, and jumps to the interrupt service routine cpu branches to 0x0000001c, and jumps to the interrupt service routine * as vicaddress of fiq is located at last address of excepted interruptions, so isr can be located at 0x0000001c if necessary, ?pop? the register setting and etc. an interrupt occurs (irq) an interrupt occurs (fiq) end return from the interrupt service routine (isr). * in case of using multiple interruption, set to ?disable? for enable register in cpu. clear the interrupt request of peripheral circuit. *in case of ?software interruption? is generated, clear the vicsoftclear register. execute the interrupt service routine (isr) if necessary, ?push? the register setting and etc. if necessary, ?pop? the register setting and etc. tmpa901cm tmpa901cm- 82 2010-07-29 3.7.4 interrupt sources table 3.7.1 interrupt sources interrupt source number (note) interrupt source vector address 0 wdt vector address 0 1 rtc vector address 1 2 timer01 vector address 2 3 timer23 vector address 3 4 timer45 vector address 4 5 gpiod:inta (tsi), intb vector address 5 6 i 2 c ch0 vector address 6 7 reserved vector address 7 8 adc vector address 8 9 reserved vector address 9 10 uart ch0 vector address 10 11 uart ch1 vector address 11 12 ssp ch0 vector address 12 13 reserved vector address 13 14 ndfc vector address 14 15 reserved vector address 15 16 dma transfer error vector address 16 17 dma terminal count vector address 17 18 lcdc vector address 18 19 reserved vector address 19 20 lcdda vector address 20 21 usb device vector address 21 22 reserved vector address 22 23 i 2 s vector address 23 24 reserved vector address 24 25 reserved vector address 25 26 reserved vector address 26 27 usb host vector address 27 28 reserved vector address 28 29 reserved vector address 29 30 gpioc (int9) vector address 30 31 gpioa (ki0 to ki7) vector address 31 note: ints[num] shows the interrupt source si gnal. ex: ints[1]: rtc interrupt source signal. tmpa901cm tmpa901cm- 83 2010-07-29 3.7.5 sfrs the following lists the sfrs: table 3.7.2 sfr (1/2) register name address (base+) description vicirqstatus 0x0000 irq status register vicfiqstatus 0x0004 fiq status register vicrawintr 0x0008 raw interrupt status register vicintselect 0x000c interrupt select register vicintenable 0x0010 interrupt enable register vicintenclear 0x0014 interrupt enable clear register vicsoftint 0x0018 software interrupt register vicsoftintclear 0x001c software interrupt clear register vicprotection 0x0020 prot ection enable register vicswprioritymask 0x0024 software priority mask register ? 0x0028 reserved vicvectaddr0 0x0100 vector address 0 register vicvectaddr1 0x0104 vector address 1 register vicvectaddr2 0x0108 vector address 2 register vicvectaddr3 0x010c vect or address 3 register vicvectaddr4 0x0110 vector address 4 register vicvectaddr5 0x0114 vector address 5 register vicvectaddr6 0x0118 vector address 6 register ? 0x011c reserved vicvectaddr8 0x0120 vector address 8 register ? 0x0124 reserved vicvectaddr10 0x0128 vector address 10 register vicvectaddr11 0x012c vector address 11 register vicvectaddr12 0x0130 vector address 12 register ? 0x0134 reserved vicvectaddr14 0x0138 vector address 14 register ? 0x013c reserved vicvectaddr16 0x0140 vector address 16 register vicvectaddr17 0x0144 vector address 17 register vicvectaddr18 0x0148 vector address 18 register ? 0x014c reserved vicvectaddr20 0x0150 vector address 20 register vicvectaddr21 0x0154 vector address 21 register ? 0x0158 reserved vicvectaddr23 0x015c vector address 23 register ? 0x0160 reserved ? 0x0164 reserved ? 0x0168 reserved vicvectaddr27 0x016c vector address 27 register ? 0x0170 reserved ? 0x0174 reserved vicvectaddr30 0x0178 vector address 30 register vicvectaddr31 0x017c vector address 31 register base address = 0xf400_0000 tmpa901cm tmpa901cm- 84 2010-07-29 table 3.7.3 sfr (2/2) register name address (base+) description vicvectpriority0 0x0200 vector priority 0 register vicvectpriority1 0x0204 vector priority 1 register vicvectpriority2 0x0208 vector priority 2 register vicvectpriority3 0x020c vector priority 3 register vicvectpriority4 0x0210 vector priority 4 register vicvectpriority5 0x0214 vector priority 5 register vicvectpriority6 0x0218 vector priority 6 register ? 0x021c reserved vicvectpriority8 0x0220 vector priority 8 register ? 0x0224 reserved vicvectpriority10 0x0228 vector priority 10 register vicvectpriority11 0x022c vector priority 11 register vicvectpriority12 0x0230 vector priority 12 register ? 0x0234 reserved vicvectpriority14 0x0238 vector priority 14 register ? 0x023c reserved vicvectpriority16 0x0240 vector priority 16 register vicvectpriority17 0x0244 vector priority 17 register vicvectpriority18 0x0248 vector priority 18 register ? 0x024c reserved vicvectpriority20 0x0250 vector priority 20 register vicvectpriority21 0x0254 vector priority 21 register ? 0x0258 reserved vicvectpriority23 0x025c vector priority 23 register ? 0x0260 reserved ? 0x0264 reserved ? 0x0268 reserved vicvectpriority27 0x026c vector priority 27 register ? 0x0270 reserved ? 0x0274 reserved vicvectpriority30 0x0278 vector priority 30 register vicvectpriority31 0x027c vector priority 31 register vicaddress 0x0f00 vector address register tmpa901cm tmpa901cm- 85 2010-07-29 1. vicirqstatus (irq status register) bit bit symbol type reset value description [31:0] irqstatus ro 0x00000000 irq interrupt status after masked (for each bit) 0y0: interrupt is inactive. 0y1: interrupt is active. [description] a. tmpa901cm tmpa901cm- 86 2010-07-29 3. vicrawintr (raw interrupt status register) bit bit symbol type reset value description [31:0] rawinterrupt ro undefined irq interrupt status before masked (for each bit) 0y0: interrupt is inactive. 0y1: interrupts is active. [description] a. tmpa901cm tmpa901cm- 87 2010-07-29 5. vicintenable (inter rupt enable register) bit bit symbol type reset value description [31:0] intenable ro 0x00000000 interrupt enable (for each bit) 0y0: disable 0y1: enable bit bit symbol type reset value description [31:0] intenable wo 0x00000000 interrupt enable (for each bit) 0y0: invalid 0y1: enable [description] a. tmpa901cm tmpa901cm- 88 2010-07-29 6. vicintenclear (interru pt enable clear register) bit bit symbol type reset value description [31:0] intenable clear wo undefined interrupt disable (for each bit) 0y0: invalid 0y1: disable [description] a. tmpa901cm tmpa901cm- 89 2010-07-29 8. vicsoftintclear (software interrupt clear register) bit bit symbol type reset value description [31:0] softintclear wo undefined software interrupt disable (for each bit) 0y0: invalid 0y1: disable [description] a. tmpa901cm tmpa901cm- 90 2010-07-29 10. vicswprioritymask (softwar e priority mask register) bit bit symbol type reset value description [31:16] ? ? undefined read as undefined. write as zero. [15:0] swprioritymask r/w 0xffff masks software priority level 0y0: mask 0y1: do not mask [description] a. tmpa901cm tmpa901cm- 91 2010-07-29 12. vicvectpriority0 (vector priority 0 register) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. write as zero. [3:0] vectpriority r/w 0y1111 s/w priority level for interrupt source 0: 0y0000 to 0y1111 [description] a. tmpa901cm tmpa901cm- 92 2010-07-29 3.8 dmac (dma controller) 3.8.1 functional overview the dma controller has the following features: table 3.8.1 dma controller functions item function description number of channels 8 ch hardware request 16 types of dma requests for peripheral ips. refer to table 3.8.2. dma start software request activated by writing values into dmacsoftbreq bus master 32 bits 2 (ahb) dma1, dma2 priority dma channel 0 (high) to dma channel 7 (low) hardware-fixed fifo 4 words 8 ch bus width 8/16/32 bits source and destination can be programmed separately. burst size 1/4/8/16/32/64/128/256 transfer count ~4095 source address incr / no-incr address destination address incr / no-incr address wrapping is not supported. endian only little endian is supported. peripheral circuit (regi ster) to peripheral circuit (register) peripheral circuit (register) to memory memory to peripheral circuit (register) transfer type memory to memory dma cannot start by hardware request in memory to memory transfer. refer to the description of dmaccxconfiguration register for details. interrupt terminal count interrupt transfer error interrupt special function scatter/gather function tmpa901cm tmpa901cm- 93 2010-07-29 ? dma transfer types dma transfer direction dma request generator dma request used description 1 memory-to-peripheral peripheral burst r equest 1: use bust request in all transactions 2: when the single request, set dmac busrt to 1 2 peripheral-to-memory peripheral burst request/ single request (note 1) for transactions that are not an integral multiple of the burst size, use both the burst and single request signals. the amount of data left to transfer burst size :use burst transfer the amount of data left to transfer < burst size : use single transfer 3 memory-to-memory (note 2) dmac none start condition: when enabled, the dma channel commences transfers without dma requests. stop conditions: all transfer data has finished transfer. disable dmac channel (note 2) transfer size source side destination side 1)integral multiple of the burst size burst request source peripheral burst request/ single request (note 1) 2) single transfer single request 4 peripheral-to-peripheral destination peripheral burst request 3) not imtegral multiple of the burst size burst request single request burst request note 1: peripheral that can use the single request: uart and lcdda. note 2:you must program memory-to-memory transfers wi th a low channel priority , otherwise the other dma channels cannot access the bus until the huge me mory-to-memory transfer has finished. 1. memory-to-peripheral 2. peripheral-to-memory dmac peripheral dmacbreq dmacclr dmac peripheral dmacbreq dmacclr dmacsreq amba bus tmpa901cm tmpa901cm- 94 2010-07-29 3. memory-to-memory 4. peripheral-to-peripheral ? ?1) integral multiple of the burst size 2) single transfer 3) not integral multiple of the burst size dmac memory amba bus dmac source peripheral dmacclr dmacsreq amba bus destination peripheral dmacbreq dmacclr dmac source peripheral dmacclr dmacsreq amba bus destination peripheral dmacbreq dmacclr dmacbreq dmac source peripheral dmacbreq dmacclr destination peripheral dmacbreq dmacclr amba bus tmpa901cm tmpa901cm- 95 2010-07-29 3.8.2 block diagram table 3.8.2 dma request number chart peripheral dma request number burst single 0 uart0 transmit uart0 transmit 1 uart0 receive uart0 receive 2 ssp0 transmit ssp0 transmit 3 ssp0 receive ssp0 receive 4 nandc ? 5 reserved ? 6 reserved reserved 7 reserved reserved 8 reserved ? 9 reserved ? 10 i2s1 ? 11 i2s0 ? 12 reserved reserved 13 reserved reserved 14 lcdda lcdda 15 ? ? ahb master i/f 1 ahb master i/f 2 ahb slave i/f ? [15] lcdda [14] reserved [13] reserved [12] i2s0 [11] i2s1 [10] reserved [9] reserved [8] reserved [7] reserved [6] reserved [5] nandc [4] ssp0 receive [3] ssp0 transmit [2] uart0 receive [1] uart0 transmit [0] ? [15] lcdda [14] reserved [13] reserved [12] ? [11] ? [10] ? [9] ? [8] reserved [7] reserved [6] ? [5] ? [4] ssp0 receive [3] ssp0 transmit [2] uart0 receive [1] uart0 transmit [0] burst request single request cpu data. dma2 dma1 dma request and response i/f ints [16] (dmacinterr) ints [17] (dmacinttc) channel logic and register control logic and register dmacclr[15:0] interrupt request tmpa901cm tmpa901cm- 96 2010-07-29 3.8.3 register descriptions the following lists the sfrs: table 3.8.3 sfr register name address (base+) description dmacintstaus 0x0000 dmac interrupt status register dmacinttcstatus 0x0004 dmac interrupt terminal count status register dmacinttcclear 0x0008 dmac interrupt terminal count clear register dmacinterrorstatus 0x000c dmac interrupt error status register dmacinterrclr 0x0010 dmac interrupt error clear register dmacrawinttcstatus 0x0014 dmac raw interr upt terminal count status register dmacrawinterrorstatus 0x018 dmac raw error interrupt status register dmacenbldchns 0x01c dmac enabled channel register dmacsoftbreq 0x020 dmac software burst request register dmacsoftsreq 0x024 dmac software single request register ? 0x028 reserved ? 0x02c reserved dmacconfiguration 0x030 dmac configuration register ? 0x034 reserved dmacc0srcaddr 0x100 dmac channel0 source address register dmacc0destaddr 0x104 dmac channel0 destination address register dmacc0lli 0x108 dmac channel0 linked list item register dmacc0control 0x10c dmac channel0 control register dmacc0configuration 0x110 dmac channel0 configuration register dmacc1srcaddr 0x120 dmac channel1 source address register dmacc1destaddr 0x124 dmac channel1 destination address register dmacc1lli 0x128 dmac channel1 linked list item register dmacc1control 0x12c dmac channel1 control register dmacc1configuration 0x130 dmac channel1 configuration register dmacc2srcaddr 0x140 dmac channel2 source address register dmacc2destaddr 0x144 dmac channel2 destination address register dmacc2lli 0x148 dmac channel2 linked list item register dmacc2control 0x14c dmac channel2 control register dmacc2configuration 0x150 dmac channel2 configuration register dmacc3srcaddr 0x160 dmac channel3 source address register dmacc3destaddr 0x164 dmac channel3 destination address register dmacc3lli 0x168 dmac channel3 linked list item register dmacc3control 0x16c dmac channel3 control register dmacc3configuration 0x170 dmac channel3 configuration register dmacc4srcaddr 0x180 dmac channel4 source address register dmacc4destaddr 0x184 dmac channel4 destination address register dmacc4lli 0x188 dmac channel4 linked list item register dmacc4control 0x18c dmac channel4 control register dmacc4configuration 0x190 dmac channel4 configuration register dmacc5srcaddr 0x1a0 dmac channel5 source address register dmacc5destaddr 0x1a4 dmac channel5 destination address register dmacc5lli 0x1a8 dmac channel5 linked list item register dmacc5control 0x1ac dmac channel5 control register dmacc5configuration 0x1b0 dmac channel5 configuration register base address = 0xf410_0000 tmpa901cm tmpa901cm- 97 2010-07-29 note: access the registers by using word reads and word writes. register name address (base+) description dmacc6srcaddr 0x1c0 dmac channel 6 source address register dmacc6destaddr 0x1c4 dmac channel6 destination address register dmacc6lli 0x1c8 dmac channel6 linked list item register dmacc6control 0x1cc dmac channel6 control register dmacc6configuration 0x1d0 dmac channel6 configuration register dmacc7srcaddr 0x1e0 dmac channel7 source address register dmacc7destaddr 0x1e4 dmac channel7 destination address register dmacc7lli 0x1e8 dmac channel7 linked list item register dmacc7control 0x1ec dmac channel7 control register dmacc7configuration 0x1f0 dmac channel7 configuration register ? 0xfe0 reserved ? 0xfe4 reserved ? 0xfe8 reserved ? 0xfec reserved ? 0xff0 reserved ? 0xff4 reserved ? 0xff8 reserved ? 0xffc reserved ? 0x500 reserved ? 0x504 reserved ? 0x508 reserved ? 0x50c reserved tmpa901cm tmpa901cm- 98 2010-07-29 1. dmacintstatus (dmac interrupt status register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7] intstatus7 ro 0y0 dmac channel 7 interrupt status 0y1 interrupt requested 0y0: interrupt not requested [6] intstatus6 ro 0y0 dmac channel 6 interrupt status 0y1: interrupt requested 0y0: interrupt not requested [5] intstatus5 ro 0y0 dmac channel 5 interrupt status 0y1: interrupt requested 0y0: interrupt not requested [4] intstatus4 ro 0y0 dmac channel 4 interrupt status 0y1: interrupt requested 0y0: interrupt not requesed [3] intstatus3 ro 0y0 dmac channel 3 interrupt status 0y1: interrupt requested 0y0: interrupt not requested [2] intstatus2 ro 0y0 dmac channel 2 interrupt status 0y1: interrupt requested 0y0: interrupt not requested [1] intstatus1 ro 0y0 dmac channel 1 interrupt status 0y1: interrupt requested 0y0: interrupt not requested [0] intstatus0 ro 0y0 dmac channel 0 interrupt status 0y1: interrupt requested 0y0: interrupt not requested [description] a. tmpa901cm tmpa901cm- 99 2010-07-29 2. dmacinttcstatus (dmac interrupt terminal count status register) bit bit symbol ty pe reset value description [31:8] ? ? undefine d read as undefined. [7] intstatustc7 r o 0y0 dmac channel 7 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [6] intstatustc6 r o 0y0 dmac channel 6 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [5] intstatustc5 r o 0y0 dmac channel 5 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [4] intstatustc4 r o 0y0 dmac channel 4 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [3] intstatustc3 r o 0y0 dmac channel 3 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [2] intstatustc2 r o 0y0 dmac channel 2 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [1] intstatustc1 r o 0y0 dmac channel 1 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [0] intstatustc0 r o 0y0 dmac channel 0 terminal count interrupt status 0y1: interrupt requested 0y0: interrupt not requested [description] a. tmpa901cm tmpa901cm- 100 2010-07-29 3. dmacinttcclear (dmac interrupt terminal count clear register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7] inttcclear7 wo 0y0 dmac channel 7 terminal count interrupt clear 0y0 invalid 0y1 clear [6] inttcclear6 wo 0y0 dmac channel 6 terminal count interrupt clear 0y0 invalid 0y1 clear [5] inttcclear5 wo 0y0 dmac channel 5 terminal count interrupt clear 0y0 invalid 0y1 clear [4] inttcclear4 wo 0y0 dmac channel 4 terminal count interrupt clear 0y0 invalid 0y1 clear [3] inttcclear3 wo 0y0 dmac channel 3 terminal count interrupt clear 0y0 invalid 0y1 clear [2] inttcclear2 wo 0y0 dmac channel 2 terminal count interrupt clear 0y0 invalid 0y1 clear [1] inttcclear1 wo 0y0 dmac channel 1 terminal count interrupt clear 0y0 invalid 0y1 clear [0] inttcclear0 wo 0y0 dmac channel 0 terminal count interrupt clear 0y0 invalid 0y1 clear [description] a. tmpa901cm tmpa901cm- 101 2010-07-29 4. dmacinterrorstatus (dmac inte rrupt error status register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7] interrstatus7 ro 0y0 dmac channel 7 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [6] interrstatus6 ro 0y0 dmac channel 6 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [5] interrstatus5 ro 0y0 dmac channel 5 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [4] interrstatus4 ro 0y0 dmac channel 4 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [3] interrstatus3 ro 0y0 dmac channel 3 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [2] interrstatus2 ro 0y0 dmac channel 2 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [1] interrstatus1 ro 0y0 dmac channel 1 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [0] interrstatus0 ro 0y0 dmac channel 0 error interrupt status 0y0: interrupt not requested 0y1: interrupt requested [description] a. tmpa901cm tmpa901cm- 102 2010-07-29 5. dmacinterrclr (dmac interru pt error clear register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7] interrclr7 wo 0y0 dmac channel 7 error interrupt clear 0y0: invalid 0y1: clear [6] interrclr6 wo 0y0 dmac channel 6 error interrupt clear 0y0: invalid 0y1: clear [5] interrclr5 wo 0y0 dmac channel 5 error interrupt clear 0y0: invalid 0y1: clear [4] interrclr4 wo 0y0 dmac channel 4 error interrupt clear 0y0: invalid 0y1: clear [3] interrclr3 wo 0y0 dmac channel 3 error interrupt clear 0y0: invalid 0y1: clear [2] interrclr2 wo 0y0 dmac channel 2 error interrupt clear 0y0: invalid 0y1: clear [1] interrclr1 wo 0y0 dmac channel 1 error interrupt clear 0y0: invalid 0y1: clear [0] interrclr0 wo 0y0 dmac channel 0 error interrupt clear 0y0: invalid 0y1: clear [description] a. tmpa901cm tmpa901cm- 103 2010-07-29 6. dmacrawinttcstatus (dmac raw interr upt terminal count status register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7] rawinttcs7 ro 0y0 dmac channel 7 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [6] rawinttcs6 ro 0y0 dmac channel 6 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [5] rawinttcs5 ro 0y0 dmac channel 5 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [4] rawinttcs4 ro 0y0 dmac channel 4 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [3] rawinttcs3 ro 0y0 dmac channel 3 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [2] rawinttcs2 ro 0y0 dmac channel 2 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [1] rawinttcs1 ro 0y0 dmac channel 1 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [0] rawinttcs0 ro 0y0 dmac channel 0 terminal count interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [description] a. tmpa901cm tmpa901cm- 104 2010-07-29 7. dmacrawinterrorstatus (dmac raw error interrupt status register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7] rawinterrs7 ro 0y0 dmac channel 7 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [6] rawinterrs6 ro 0y0 dmac channel 6 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [5] rawinterrs5 ro 0y0 dmac channel 5 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [4] rawinterrs4 ro 0y0 dmac channel 4 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [3] rawinterrs3 ro 0y0 dmac channel 3 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [2] rawinterrs2 ro 0y0 dmac channel 2 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [1] rawinterrs1 ro 0y0 dmac channel 1 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [0] rawinterrs0 ro 0y0 dmac channel 0 error interrupt raw status 0y0: interrupt not requested 0y1: interrupt requested [description] a. tmpa901cm tmpa901cm- 105 2010-07-29 8. dmacenbldchns (dmac enabled channel register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7] enabledch7 ro 0y0 dma channel 7 enable status 0y0: disable 0y1: enable [6] enabledch6 ro 0y0 dma channel 6 enable status 0y0: disable 0y1: enable [5] enabledch5 ro 0y0 dma channel 5 enable status 0y0: disable 0y1: enable [4] enabledch4 ro 0y0 dma channel 4 enable status 0y0: disable 0y1: enable [3] enabledch3 ro 0y0 dma channel 3 enable status 0y0: disable 0y1: enable [2] enabledch2 ro 0y0 dma channel 2 enable status 0y0: disable 0y1: enable [1] enabledch1 ro 0y0 dma channel 1 enable status 0y0: disable 0y1: enable [0] enabledch0 ro 0y0 dma channel 0 enable status 0y0: disable 0y1: enable [description] a. tmpa901cm tmpa901cm- 106 2010-07-29 9. dmacsoftbreq (dmac software burst request register) bit bit symbol ty pe reset value description [31:15 ] ? ? undefine d read as undefined. write as zero. [14] softbreq14 r/ w 0y0 dma burst request of lcdda by software 0y0: invalid when data write 0y1: generate a dma burst request [13:10 ] reserved r/ w undefine d read as undefined. write as zero. [11] softbreq11 r/ w 0y0 dma burst request of i 2 s0 by software 0y0: invalid when data write 0y1: generate a dma burst request [10] softbreq10 r/ w 0y0 dma burst request of i 2 s1 by software 0y0: invalid when data write 0y1: generate a dma burst request [9:5] reserved r/ w undefine d read as undefined. write as zero. [4] softbreq4 r/ w 0y0 dma burst request of nandc0 by software 0y0: invalid when data write 0y1: generate a dma burst request [3] softbreq3 r/ w 0y0 dma burst request of ssp0 receive by software 0y0: invalid when data write 0y1: generate a dma burst request [2] softbreq2 r/ w 0y0 dma burst request of ssp0 transmit by software 0y0: invalid when data write 0y1: generate a dma burst request [1] softbreq1 r/ w 0y0 dma burst request of uart0 receive by software 0y0: invalid when data write 0y1: generate a dma burst request [0] softbreq0 r/ w 0y0 dma burst request of uart0 transmit by software 0y0: invalid when data write 0y1: generate a dma burst request [description] a. tmpa901cm tmpa901cm- 107 2010-07-29 10. dmacsoftsreq (dmac software single request register ) bit bit symbol type reset value description [31:16] ? ? undefined read as undefined. write as zero. [15] reserved r/w undefined read as undefined. write as zero. [14] softsreq14 r/w 0y0 dma single request by software for lcdda 0y0: invalid when data write 0y1: generate a dma single request [13:4] reserved r/w undefined read as undefined. write as zero. [3] softsreq3 r/w 0y0 dma single request of ssp0 recevie by software 0y0: invalid when data write 0y1: generate a dma single request [2] softsreq2 r/w 0y0 dma single request of ssp0 transimit by software 0y0: invalid when data write 0y1: generate a dma single request [1] softsreq1 r/w 0y0 dma single request by software for uart0 receive 0y0: invalid when data write 0y1: generate a dma single request [0] softsreq0 r/w 0y0 dma single request b software for uart0 transmit 0y0: invalid when data write 0y1: generate a dma single request [description] a. tmpa901cm tmpa901cm- 108 2010-07-29 11. dmacconfiguration (dma c configuration register) bit bit symbol type reset value description [31:3] ? ? undefined read as undefined. write as zero. [2] m2 r/w 0y0 dma2 endianness 0y0 little endian mode 0y1 reserved [1] m1 r/w 0y0 dma1 endianness 0y0 little endian mode 0y1 reserved [0] e r/w 0y0 dma circuit control 0y0: stopped 0y1: active [description] a. tmpa901cm tmpa901cm- 109 2010-07-29 12. dmacc0srcaddr (dmac channel0 source address register) bit bit symbol type reset value description [31:0] srcaddr r/w 0x00000000 set the dma transfer source address [description] a. tmpa901cm tmpa901cm- 110 2010-07-29 13. dmacc0destaddr (dmac channel 0 destination address register) bit bit symbol type reset value description [31:0] destaddr r/w 0x00000000 set the dma transfer destination address [description] a. tmpa901cm tmpa901cm- 111 2010-07-29 14. dmacc0lli (dmac channel0 linked list item register) bit bit symbol type reset value description [31:2] lli r/w 0x00000000 set the start address of the next transfer information [1] ? ? undefined read as undefined. write as zero. [0] lm r/w 0y0 ahb master for storing lli: 0y0: dma1 0y1: dma2 [description] a. tmpa901cm tmpa901cm- 112 2010-07-29 15. dmacc0control (dmac c hannel0 control register) bit bit symbol type reset value description [31] i r/w 0y0 terminal count interrupt enable register when using the scatter/gather function 0y0: disable 0y1: enable [30] prot[3] r/w 0y0 control cache permission hprot[3] 0y0: noncacheable 0y1: cacheable [29] prot[2] r/w 0y0 control buffer permission hprot[2] 0y0: nonbufferable 0y1: bufferable [28] prot[1] r/w 0y0 control privileged mode hprot[1] 0y0: user mode 0y1: privileged mode [27] di r/w 0y0 increment the transfer destination address 0y0: do not increment 0y1: increment [26] si r/w 0y0 increment the transfer source address 0y0: do not increment 0y1: increment [25] d r/w 0y0 transfer destination ahb master 0y0: dma1 0y1: dma2 [24] s r/w 0y0 transfer source ahb master 0y0: dma1 0y1: dma2 [23:21] dwidth[2:0] r/w 0y000 transfer destination bit width 0y000: byte (8 bits) 0y001: half-word (16 bits) 0y010: word (32 bits) other: reserved [20:18] swidth[2:0] r/w 0y000 transfer source bit width 0y000: byte (8 bits) 0y001: half-word (16 bits) 0y010: word (32 bits) other: reserved [17:15] dbsize[2:0] r/w 0y000 transfer destination burst size: 0y000 1 beat 0y001 4 beats 0y010: 8 beats 0y011: 16 beats 0y100: 32 beats 0y101: 64 beats 0y110: 128 beats 0y111: 256 beats [14:12] sbsize[2:0] r/w 0y000 transfer source burst size: 0y000: 1 beat 0y001: 4 beats 0y010: 8 beats 0y011: 16 beats 0y100: 32 beats 0y101: 64 beats 0y110: 128 beats 0y111: 256 beats [11:0] transfersize r/w 0x000 set the total transfer count a ddress = (0xf410_0000) + (0x010c) tmpa901cm tmpa901cm- 113 2010-07-29 [description] ? ? the description below applies to all channels. a. it is enable register of terminal count interrupt. terminal count interrupt is generated by setting =1 and damccxconfiguration register tmpa901cm tmpa901cm- 114 2010-07-29 h. s transfer source ahb master 0y0: dma1 0y1: dma2 i. dwidth[2:0] transfer destination bit width 0y000: byte (8 bits) 0y001: half-word (16 bits) 0y010: word (32 bits) other: reserved j. tmpa901cm tmpa901cm- 115 2010-07-29 ? ? ? dmaccxcontrol (dmac channel x control register) (x = 0 to 7) the dmaccxcontrol registers have the same structure as dmacc0control. please refer to the description of dmacc0control. for the names and addresses of th ese registers, please refer to table 3.8.3. tmpa901cm tmpa901cm- 116 2010-07-29 16. dmacc0configuration (dmac ch annel0 configuration register) bit bit symbol type reset value description [31:19] ? ? undefined read as undefined. write as zero. [18] halt r/w 0y0 0y0: dma requests accepted 0y1: dma requests ignored read: 0y0: no data in the fifo 0y1: the fifo has data [17] active ro 0y0 write: invalid [16] lock r/w 0y0 0y0: disable lock transfers 0y1: enable lock transfers [15] itc r/w 0y0 terminal count interrupt enable register 0y0: disable interrupts 0y1: enable interrupts [14] ie r/w 0y0 error interrupt enable register 0y0: disable interrupts 0y1: enable interrupts [13:11] flowcntrl r/w 0y000 flowcntrl set value transfer mode 0y000 memory to memory 0y001 memory to peripheral 0y010 peripheral to memory 0y011 peripheral to peripheral 0y100-0y111: reserved [10] ? ? undefined read as undefined. write as zero. [9:6] destperipheral r/w 0y000 trans fer destination peripheral (note1) 0y000-0y1111 [5] ? ? undefined read as undefined. write as zero. [4:1] srcperipheral r/w 0y000 transfer source peripheral (note1) 0y000-0y1111 [0] e r/w 0y0 channel enable 0y0: disable 0y1: enable note: please refer to table 3.8.2 dma request number chart. [description] a. < itc > it is an enable register of transfer end interrupt. transfer end interrupt is generated by setting tmpa901cm tmpa901cm- 117 2010-07-29 b. < flowcntrl> this bit sets the transfer mode. 0y000: memory to memory 0y001: memory to peripheral 0y010: peripheral to memory 0y011: peripheral to peripheral 0y100 to 0y111: reserved note: when you selected memory-to-memory, hardware start triggered by dma is not supported. transfer is started by writing tmpa901cm tmpa901cm- 118 2010-07-29 ? dmac configuration flow ex: using dmac ch1, transfer from memory to built-in fifo of i 2 s total transfer data size: 32 words transfer count unit : swidth = word total transfer count : 32 counts dmacconfiguration 0x00000001 ; set dmac active dmacc1srcaddr memory address ; source address (dmac ch1) dmacc1destaddr i2stdat ; destination address dmacc1control 0x04492020 ; destination address fixed ; source address increment ; swidth = word, dswidth = word ; dbsize= 8 bursts, sbsize= 8 bursts (note) ; transfersize = 32 counts dmacc1configuration 0x00000a81 ; channel1 enable, ; memory to peripheral (i 2 s1) ? ? ? ? ; i 2 s configuration and preparation ? ? i2stdma1 0x00000001 ; i 2 s dma ready and request dma transfer note: please set burst size equivalent to the fifo size of peripheral. tmpa901cm tmpa901cm- 119 2010-07-29 3.8.4 special function 1) scatter/gather function when a part of image data is cut off and tran sferred, the image data is not be handled as consecutive data. the addresses of the image data to be transferred are scattered according to specific rule. since dma can only transfer data to consecutive addresses, the transfer settings must be reconfigured each time a gap occurs in the sequence of transfer addresses. the scatter/gather function enables a continuous dma operation without involving the cpu by allowing the transfer settings (source address, destination addr ess, transfer count, transfer bus width) to be re-loaded each ti me a specified number of dma transfers have been completed. this is done by using the linked lists (lli).. the scatter/gather function is controlled by setting the dmaccxlli register to 1. a linked list includes information comprised of the following four words: 1) dmaccxsrcaddr 2) dmaccxdestaddr 3) dmaccxlli 4) dmaccxcontrol it is also possible to generate interrupts in conjunction with the scatter/gather function. terminal count interrupt is generated by setting both dmaccxcontrol register=1 and dmaccxconfiguration register tmpa901cm tmpa901cm- 120 2010-07-29 2) linked list operation to use the scatter/gather function, a series of linked lists should be created to define source and destinat ion data areas. lli enables to transfer unordered multiple blocks sequentially. each lli transfers data based on the configuration of normal dma cont inuous transfer. upon completion of each dma transfer, the next lli is loaded to continuously perform dma operation (daisy-chained operation). the following shows a setting example: 1. set the information for the first dm a transfer to the dma registers. 2. write the information for the second and subsequent transfers to the memory space of the address specified by ?next lli addressx?. 3. to finish the linked list operation with the nth dma transfer, set ?next lli addressx? to 0x00000000. destination memory image source memory image source address1 destinaton address1 next lli address2 control register value source address2 destination address2 next lli address3 control register value source addressn destination addressn 0x00000000 control register value +0 +4 +8 +c ??? lli address2 lli addressn directly specified in the dma setting registers tmpa901cm tmpa901cm- 121 2010-07-29 example: when transferring data in the area enclosed by the square dmaccxsrcaddr: 0x0a200 dmaccxdestaddr: destination address 1 dmaccxlli: 0x200000 dmaccxcontrol: set the number of burst transfers, etc. 0x0a000 0x0b000 0x0c000 0x00200 0x00e00 0x0b200(srcaddr) dest addr2 0x200010 control register value 0x0c200(srcaddr) dest addr3 0x00000000 control register value 0x200000 +4 +8 +c 0x200010 +4 +8 +c indicates that a sequence of transfers ends with this lli. linked list tmpa901cm tmpa901cm-122 2010-07-29 3.9 port functions the list of the port pin functions and input-output port programming show how to configure each pin. information on power sources is also provided as different power sources are used for individual external pins. table 3.9.1 tmpa901cm pin assignment (dedicated pins) open-drain port i/o port no. of internal int vectors no. of external int pins no. of pads 8 8 8 8 8 4 7 4 6 7 5 6 4 bit 0 ? smcoen dmcsdqm0 dmcddm0 dmcdclkp dmcsclk x1 selmemc tck ddp bit 1 ? dmcwen dmcsdqm1 dmcddm1 dmcdclkn x2 seldvccm tms ddm bit 2 smcbe0n dmcrasn ? dmcap xt1 seljtag tdi ? bit 3 smccs0n dmccasn ? ? xt2 ? trstn rext bit 4 smccs1n dmcba0 smcwen dmcddqs0 resetn ? rtck vsens bit 5 ? dmcba1 smcbe1n dmcddqs1 ? ? tdo ? bit 6 ? dmccke ? dmcclkin am0 hdp ? ? bit 7 d[7:0] d[15:8] a[7:0] a[15:8] a[23:16] dmccsn ? ? ? am1 hdm ? ? alias sa sb ? ? se sf sg sh sj sk sl sm sn sp sr destination memory clock, mode usb host mode jtag usb2 power supply dvccm dvcc3io dvcc1c,1b dvcc3io, avcc3h dvcc3io avdd3t/3c note 1: dedicated pins (with no port function). note 2: the alias ?sx? in the table above is only a sy mbol and does not have any gener al-purpose port function. tmpa901cm tmpa901cm-123 2010-07-29 table 3.9.2 tmpa901cm pin assignment (dual-purpose pins) open-drain port 4 2 i/o port 4(i) 4(o) 3(o) 2(i/o) 4(i) 2(i/o) 8(i/o) 8(i/o) 8(i/o) no. of internal int vectors 1 1 1 0 no. of external int p ins 4 1 2 0 no . of pads 4 4 5 4 2 8 8 8 bit 0 ki0 ko0 lclcp ? ? u0txd sir0out sp0fss i2s0ws ndd0 ld0 ndren ld8 bit 1 ki1 ko1 lclac ? ? u0rxd sir0in sp0clk i2s0clk ndd1 ld1 ndwen ld9 bit 2 ki2 ko2 lclfp pwe ? ? sp0do i2s0dati ndd2 ld2 ndale ld10 bit 3 ki3 ko3 lcllp mldalm pwm0out ? ? sp0di i2s0mclk ndd3 ld3 ndcle ld11 bit 4 ? ? fsout pwm2out an4 mx ? u1txd usbpon ndd4 ld4 ndce0n ld12 bit 5 ? ? ? an5 my ? u1rxd usbocn ndd5 ld5 ndce1n ld13 bit 6 ? ? i2c0cl an6 / px inta(inttsi) ? u1ctsn i2s1dato ndd6 ld6 ndrb ld14 bit 7 ? ? i2c0da int9 an7 / py intb ? x1usb ndd7 ld7 ld15 alias pa pb pc pd pn pt pu pv destination key i2c0 int other adc tsi,int uart0 ssp0, usb h/d uart1 nand lcdc nand lcdc power supply dvc3io avcc3ad dvcc3io dvcc3io dvcc3io dvcc3io note 1: dual-purpose pins (t hey have the port function.) note 2: the alias ?px? in the table above indicates the general-purpose port function. tmpa901cm tmpa901cm-124 2010-07-29 table 3.9.3 tmpa901cm address and initial value table portv 0xff 0x00 0x00 0x00 portu 0xff 0x00 0x00 0x00 portt 0xff 0x00 0x00 0x00 portn 0xff 0x00 0x00 0x00 portd 0xff note 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 portc 0xef 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 portb 0x0 note 0x0 0x0 0x0 porta 0xf note note note 0x0 0x0 0x0 0x0 0x0 0x0 0x0 1 output port function 1 input or output enable function 2 input or output enable level both-edge rising edge or high level enable interrupt requested interrupt requested clear open-drain output meaning 0 input port gpio gpio edge single edge falling edge or low level disable no interrupt requested no interrupt requested 3-state output description data register data direction register function register 1 function register 2 interrupt sensitivity register interrupt-both-edge register interrupt event register interrupt enable register raw interrupt status register masked interrupt status register interrupt clear register open-drain output enable register address 0x000 -0x3fc 0x400 0x424 0x428 0x804 0x808 0x80c 0x810 0x814 0x818 0x81c 0xc00 r/w r/w r/w r/w r/w r/w r/w r/w r/w ro ro wo r/w register name gpiondata gpiondir gpionfr1 gpionfr2 gpionis gpionibe gpioniev gpionie gpionris gpionmis gpionic gpionode writes are prohibited depending on the bits. no register exists. note: reserved: don?t access this register. tmpa901cm tmpa901cm-125 2010-07-29 3.9.1 data registers [notes on data registers] all data registers allow all the 8 bits to be read or written simultaneously. it is also possible to mask certain bits in reading from or writing to the data registers. data registers allow accesses to a 256-addre ss space (0x0000 to 0x03fc). (assume that addresses are shifted to the high-order side by 2 bits. the lo wer 2 bits have no meaning. valid addresses exist at ever y 4 addresses, such as 0x000, 0x0004, and so on.) accesses to the 256-address space are done through the same data register. valid bits vary according to the address to be accessed. bits [9:2] of the address to be accessed correspond to bits [7:0] of the data register. address bits that are 1 are accessed in the data register and address bits that are 0 are masked. address[9:2] bit9 bit8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit mask bm7 bm6 bm5 bm4 bm3 bm2 bm1 bm0 ? example: writing 0x93 to address 0x 00e8 of port t by using bit masks bit mask bm7 bm6 bm5 bm4 bm3 bm2 bm1 bm0 00111010 gpiotdata before write pt7 pt6 pt5 pt4 pt3 pt2 pt1 pt0 write data10010011 gpiotdat a pt7 pt6 pt5 pt4 pt3 pt2 pt1 pt0 retained retained 0 write 1 write 0 write retained 1 write retained 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ? ? example: reading 0x12 from address 0x 00e8 of port t by using bit masks ????i? bit mask bm7 bm6 bm5 bm4 bm3 bm2 bm1 bm0 00111010 gpiotdata pt7 pt6 pt5 pt4 pt3 pt2 pt1 pt0 10010011 read data 0 read 0 read 0 read 1 read 0 read 0 read 1 read 0 read ? ? note: all the bits are valid in accessing 0x03f c, and no bits are valid in accessing 0x0000. tmpa901cm tmpa901cm-126 2010-07-29 3.9.2 port function settings this section describes the sett ings of port a through port v that can also function as general-purpose ports. each port should basically be a ccessed in word (32-bit) units. 3.9.2.1 port a port a can be used not only as a general-purpose input pin with pull up but also as key input pin. by enabling interrupts, port a is used as key input pins (ki3-ki0). port a can be used without pull up. please refer to section 3.26 pmc. general-purpose input setting function data value interrupt enable gpioadata gpioaie general-purpose input * 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 input input input input note: all bits are provided with pull up resisters. key input function setting function interrupt enable gpioaie key input 1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ki3 ki2 ki1 ki0 note: all bits support the interrupt function. all bits are provided with pull up resisters. register name address (base+) description gpioadata 0x03fc porta data regisiter ? 0x0400 reserved ? 0x0424 reserved ? 0x0428 reserved gpioais 0x0804 port a interrupt select register (level and edge) gpioaibe 0x0808 port a interrupt select register (single edge and both edge) gpioaiev 0x080c port a interrupt select register (falling edge/low level and rising edge/high level) gpioaie 0x0810 port a interrupt enable register gpioaris 0x0814 port a interrupt status register (raw) gpioamis 0x0818 port a interrupt status register (masked) gpioaic 0x081c port a interrupt clear register ? 0x0c00 reserved base address = 0xf080_0000 tmpa901cm tmpa901cm-127 2010-07-29 1. gpioadata (port a data register) bit bit symbol type reset value bit mask description [31:4] ? ? undefined ? read as undefined. write as zero. [3:0] pa[3:0] ro 0xf bm3:0 port a data register [description] a. tmpa901cm tmpa901cm-128 2010-07-29 4. gpioaiev (port a interrupt select register (?fa lling edge/low level? and ?rising edge/high level?)) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. written as zero. [3:0] pa3iev to pa0iev r/w 0x0 port a interrupt event register (for each bit) 0y0: falling edge/low level 0y1: rising edge/high level [description] a. tmpa901cm tmpa901cm-129 2010-07-29 6. gpioaris (port a interrupt status register (raw)) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. [3:0] pa3ris to pa0ris ro 0x0 port a interr upt raw status register (for each bit) 0y0: not requested 0y1: requested [description] a. tmpa901cm tmpa901cm-130 2010-07-29 8. gpioaic (port a interrupt clear register) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. written as zero. [3:0] pa3ic to pa0ic wo 0x0 port a in terrupt clear register (for each bit) 0y0: invalid 0y1: clear [description] a. tmpa901cm tmpa901cm-131 2010-07-29 3.9.2.2 port b port b can be used not only as general-purpos e output pins but also as k e y output pins. by enabling open-drain output, port b is used as key output (ko3-ko0). and this port has a lcdc control signal. general-purpose output setting function data value open-drain enable function select 2 gpiobdata gpiobode gpiobfr2 general-purpose output * 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 output output output output key output setting function data value open-drain enable gpiobdata gpiobode key output * 1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ko3 ko2 ko1 ko0 note: 3 to 0 bits support open-drain mode. lcd control output setting function data value open-drain enable function select 2 gpiobdata gpiobode gpiobfr2 key output * 0 1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 lcllp lclfp lclac lclcp register name address (base+) description gpiobdata 0x03fc portb data regisiter ? 0x0400 reserved ? 0x0424 reserved gpiobfr2 0x0428 portb function register2 ? 0x0804 reserved ? 0x0808 reserved ? 0x080c reserved ? 0x0810 reserved ? 0x0814 reserved ? 0x0818 reserved ? 0x081c reserved gpiobode 0x0c00 port b open-drain output enable register base address = 0xf080_1000 tmpa901cm tmpa901cm-132 2010-07-29 1. gpiobdata (port b data register) bit bit symbol type reset value bit mask description [31:4] ? ? undefined ? read as undefined. written as zero. [3:0] pb[3:0] r/w 0x0 bm3:0 port b data register [description] a. tmpa901cm tmpa901cm-133 2010-07-29 3.9.2.3 port c the upper 2 bits (bits [7:6]) of p ort c can be used as general-purpose input/output pins and the lower 3 bits (bits [4:2]) can be used as general-purpose output pins. port c can also be used as interrupt (int9), i 2 c (i2c0da, i2c0cl), low-frequency clock output (fsout), melody output (mldalm), pwm output function (pwm0out, pwm2out). and with regard to pwe pin, please refer to note described later for details. general-purpose input and interrupt settings function data value input/output select function select 1 function select 2 interrupt enable open-drain enable gpiocdata gpiocdir gpiocfr1 gpiocfr2 gpiocie gpiocode general-purpose input interrupt * 0 0 0 0/1 * bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 input/int9 input note: only bit 7 support the interrupt function. general-purpose output setting function data value input/output select function select 1 function select 2 interrupt enable open-drain enable gpiocdata gpiocdir gpiocfr1 gpiocfr2 gpiocie gpiocode general-purpose output * 1 0 0 0 0/1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 output output output output output note: bits 7 to 6 support open-drain mode. tmpa901cm tmpa901cm-134 2010-07-29 pwe setting function data value input/output select function select 1 function select 2 interrupt enable open-drain enable pmc register gpiocdata gpiocdir gp iocfr1 gpiocfr2 gpiocie gpiocode pmcctl tmpa901cm tmpa901cm-135 2010-07-29 note: about pc2 setting this mcu implements power ma nagement circuit that can cut off power supply to circuit blocks other than some special circuits and i/o pins. for details, please refer to pmc chapter). even if the power of some internal circuits is cut off, the statuses of external io can be held. care should be taken when controlling port s. furthermore, please pay special attention to the pc2 port control due to its particular circuit configuration. the below chart shows an internal circuit connection diagram. ? in pcm (power cut mode) mode, the genera l port function of pc2 can?t be used. ? to use pc2 as a general port, please set gpiocfr1 tmpa901cm tmpa901cm-136 2010-07-29 1. gpiocdata (port c data register) bit bit symbol type reset value bit mask description [31:8] ? ? undefined ? read as undefined. write as zero. [7:6] pc[7:6] r/w 0y11 bm7:6 port c data register [5] ? ? undefined ? read as undefined. write as zero. [4:2] pc[4:2] r/w 0y011 bm4:2 port c data register [1:0] ? ? undefined ? read as undefined. write as zero. [description] a. tmpa901cm tmpa901cm-137 2010-07-29 2. gpiocdir (port c data direction register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:6] pc7c to pc6c r/w 0y00 port c data direction register (for each bit) 0y0: input 0y1: output [5] ? ? undefined read as undefined. write as zero. [4:2] pc4c to pc0c ? 0y111 must be written as 1. read as 1. [1:0] ? ? undefined read as undefined. write as zero. [description] a. tmpa901cm tmpa901cm-138 2010-07-29 4. gpiocfr2 (port c function register 2) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:5] reserved r/w 0y000 must be written as 0. read as 0. [4:3] pc4f2 to pc3f2 r/w 0y00 port c function register 2 [2:0] reserved r/w 0y000 must be written as 0. read as 0. [description] a. < pc4f2 to pc3f2 > function register 2: controls the function setting. note: 1 can be set to only one of the function register 1 or the function register 2 at a time. these registers must not be written as 1 simultaneously even for an instant. table 3.9.4 function register setting table mode gpiocfr1 gpiocfr2 general-purpose 0 0 function 1 1 0 function 2 0 1 prohibited 1 1 5. gpiocis (port c interrupt sele ct register (level and edge)) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7] pc7is r/w 0y0 port c interrupt sensitivity register 0y0: edge-sensitive 0y1: level-sensitive [6:0] ? ? undefined read as undefined. written as zero. [description] a. tmpa901cm tmpa901cm-139 2010-07-29 6. gpiocibe (port c interrupt select register (single edge and both edge)) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7] pc7ibe r/w 0y0 port c interrupt both-edge register 0y0: single edge 0y1: both-edge [6:0] ? ? undefined read as undefined. written as zero. [description] a. tmpa901cm tmpa901cm-140 2010-07-29 8. gpiocie (port c interrupt enable register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7] pc7ie r/w 0y0 port c interrupt enable register 0y0: disabled 0y1: enabled [6:0] reserved r/w 0y0000000 must be written as 0. read as 0. [description] a. tmpa901cm tmpa901cm-141 2010-07-29 10. gpiocmis (port c interrupt status register (masked)) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7] pc7mis ro 0y0 port c masked interrupt status register 0y0: not requested 0y1: requested [6:0] ? ? undefined read as undefined. [description] a. tmpa901cm tmpa901cm-142 2010-07-29 following table is an example configurations of interrupt register. the configurations of each register and bit are shown below. table 3.9.5 ? an example configurations of interrupt register (gpoxis, gpioxibe, gpioxiev, gp ioxie, gpioxris, gpioxmis: x = a, c, d) register setting output gpioxis (port x interrupt se lect register (level and edge)) gpioxibe (port x interrupt se lect register (single edge and both edge) gpioxiev (port x interrupt se lect register (falling edge/low level and rising edge/high level)) gpioxie ( port x interrupt enable register ) trigger mode gpioxris ( port x interrupt status register (raw)) gpioxmis ( port x interrupt status register (masked)) ints [num] 0 falling edge detection 0 1 rising edge detection 0 1 1 0 both edge detection detection enabled detection disabled (0x00) detection disabled 0 falling edge detection 0 1 rising edge detection 0 0 1 1 1 both edge detection detection enabled detection enabled detection enabled 0 low level detection 0 1 high level detection 0 low level detection 1 1 0 high level detection detection enabled detection disabled (0x00) detection disabled 0 low level detection 0 1 high level detection 0 low level detection 1 1 1 1 high level detection detection enabled detection enabled detection enabled tmpa901cm tmpa901cm-143 2010-07-29 11. gpiocic (port c interr upt clear register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7] pc7ic wo 0y0 port c interrupt clear register 0y0: invalid 0y1: request cleared [6:0] ? ? undefined read as undefined. written as zero. [description] a. tmpa901cm tmpa901cm-144 2010-07-29 3.9.2.4 port d port d can be used as general-purpose input. port d can also be used as interrupt (int b, inta), adc (a n7-an4), and touch screen control (px, py, mx, my) pins. general-purpose input and interrupt settings function data value function select 1 function select 2 interrupt enable gpioddata gpiodfr1 gpiodfr2 gpiodie general-purpose input interrupt * 0 0 0/1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 input/intb input/inta input input input input input input note: only bits 7 and 6 support the interrupt function. adc settings function data value function select 1 function select 2 interrupt enable gpioddata gpiodfr1 gpiodfr2 gpiodie adc * 1 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 an7 an6 an5 an4 - - - - tsi settings function data value function select 1 function select 2 interrupt enable gpioddata gpiodfr1 gpiodfr2 gpiodie tsi * 0 1 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 py px/inta(inttsi) my mx ? ? ? ? tmpa901cm tmpa901cm-145 2010-07-29 1. gpioddata (port d data register) bit bit symbol type reset value bit mask description [31:8] ? ? undefined ? read as undefined. [7:4] pd[7:4] ro 0xf bm7:4 port d data register [3:0] ? ? undefined ? read as undefined. [description] a. tmpa901cm tmpa901cm-146 2010-07-29 3. gpiodfr2 (port d function register 2) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7:4] pd7f2 to pd4f2 r/w 0y0000 port d function register 2 [3:0] reserved r/w 0y0000 must be written as 0. read as 0. [description] a. tmpa901cm tmpa901cm-147 2010-07-29 5. gpiodibe (port d interrupt select register (single edge and both-edge)) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7:6] pd7ibe to d6ibe r/w 0y00 port d interrupt both-edge register (for each bit) 0y0: single edge 0y1: both-edge [5:0] reserved r/w 0y000000 must be written as 0. read as0. [description] a. tmpa901cm tmpa901cm-148 2010-07-29 7. gpiodie (port d interrupt enable register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7:6] pd7ie to pd6ie r/w 0y00 port d interrupt enable register (for each bit) 0y0: disable 0y1: enable [5:0] reserved r/w 0y000000 must be written as 0. read as 0. [description] a. tmpa901cm tmpa901cm-149 2010-07-29 9. gpiodmis (port d interrupt status register (masked)) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. [7:6] pd7mis to pd6mis ro 0y00 port d masked interrupt status register (for each bit) 0y0: not requested 0y1: requested [5:0] ? ? undefined read as undefined. [description] a. tmpa901cm tmpa901cm-150 2010-07-29 3.9.2.5 port n port n can be used as general-purpose input/output pins. port n can also b e used as uart/irda function (u0rxd, u0txd, sir0in, sir0out) pins. general-purpose input setting function data value input/output select function select 1 function select 2 gpiondata gpiondir gp ionfr1 gpionfr2 general-purpose input * 0 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 - - - - - - input input general-purpose output setting function data value input/output select function select 1 function select 2 gpiondata gpiondir gp ionfr1 gpionfr2 general-purpose output * 1 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 - - - - - - output output uart (ch0) setting function data value input/output select function select 1 function select 2 gpiondata gpiondir gp ionfr1 gpionfr2 uart(ch0) * * 1 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ? ? ? ? ? ? ? u0txd uart/irda (ch0) setting function data value input/output select function select 1 function select 2 gpiondata gpiondir gp ionfr1 gpionfr2 uart (ch0/irda) * * 0 1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ? ? ? ? ? ? sir0in /u0rxd sir0out tmpa901cm tmpa901cm-151 2010-07-29 1. gpiondata (port n data register) bit bit symbol type reset value bit mask description [31:2] ? ? undefined ? read as undefined. written as zero. [1:0] pn[1:0] r/w 0y11 bm1:0 port n data register [description] a. tmpa901cm tmpa901cm-152 2010-07-29 3. gpionfr1 (port n function register 1) bit bit symbol type reset value description [31:2] ? ? undefined read as undefined. written as zero. [1] reserved ? 0y0 must be written as 0. read as 0. [0] pn0f1 r/w 0y0 port n function register 1 [description] a. tmpa901cm tmpa901cm-153 2010-07-29 3.9.2.6 port t port t can be used as general-purpose input/output pins. port t can also be used as usb extern al cl ock in put (x1usb), uart function (u1ctsn, u1rxd, u1txd), spi function (sp0di, sp0 do, sp0clk, sp0fss), i2s control function, usbocn and usbonn pins. general-purpose input setting function data value input/output select function select 1 gpiotdata gpiotdir gpiotfr1 general-purpose input * 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 input input input input input input input input general-purpose output setting function data value input/output select function select 1 function select 2 gpiotdata gpiotdir gpiotfr1 gpiotfr2 general-purpose output * 1 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 output output output output output output output output uart, spi settings function data value input/output select function select 1 function select 2 gpiotdata gpiotdir gpiotfr1 gpiotfr2 uart spi * * 1 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 x1usb u1ctsn u1rxd u1txd sp0di sp0do sp0clk sp0fss usb host control, i2s setting function data value input/output select function select 1 function select 2 gpiotdata gpiotdir gpiotfr1 gpiotfr2 usb host i2s * * 0 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 i2s1dato usbocn usbpon i2s0mclk i2s0dati i2s0clk i2s0ws tmpa901cm tmpa901cm-154 2010-07-29 1. gpiotdata (port t data register) bit bit symbol type reset value bit mask description [31:8] ? ? undefined ? read as undefined. written as zero. [7:0] pt7 to pt0 r/w 0xff bm7:0 port t data register [description] a. tmpa901cm tmpa901cm-155 2010-07-29 3. gpiotfr1 (port t function register 1) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. written as zero. [7:0] pt7f1 to pt0f1 r/w 0x00 port t function register 1 [description] a. tmpa901cm tmpa901cm-156 2010-07-29 3.9.2.7 portu port u can be used as general-purpose input/output pins pins. p o rt u can also be used as nand controller function (ndd7 to ndd0) and, lcdc (ld7 to ld0). general-purpose input setting function data value input/output select function select 1 function select 2 gpioudata gpioudir gp ioufr1 gpioufr2 general-purpose input * 0 0 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 input input input input input input input input general-purpose output setting function data value input/output select function select 1 function select 2 gpioudata gpioudir gp ioufr1 gpioufr2 general-purpose output * 1 0 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 output output output output output output output output nandc setting function data value input/output select function select 1 function select 2 gpioudata gpioudir gp ioufr1 gpioufr2 nand * * 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 ndd7 ndd6 ndd5 ndd4 ndd3 ndd2 ndd1 ndd0 lcdc function setting function data value input/output select function select 1 function select 2 gpioudata gpioudir gp ioufr1 gpioufr2 lcdc * * 0 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 ld7 ld6 ld5 ld4 ld3 ld2 ld1 ld0 tmpa901cm tmpa901cm-157 2010-07-29 1. gpioudata (port u data register) bit bit symbol type reset value bit mask description [31:8] ? ? undefined ? read as undefined. write as zero. [7:0] pu[7:0] r/w 0xff bm7:0 port u data register [description] a. tmpa901cm tmpa901cm-158 2010-07-29 3. gpioufr1 (port u function register1) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:0] pu7f1 to pu0f1 r/w 0x00 port u function register 1 [description] a. tmpa901cm tmpa901cm-159 2010-07-29 3.9.2.8 portv port v can be used as general-purpose input/output pins pins. port v can a l so be used as nand controller function (ndrbn, ndce1n, ndce0n, ndcle, ndale, ndwen and ndren) and lcdc function (ld15 to ld8). general-purpose input setting function data value input/output select function select 1 function select 2 gpiovdata gpiovdir gpiovfr1 gpiovfr2 general-purpose input * 0 0 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 input input input input input input input input general-purpose output setting function data value input/output select function select 1 function select 2 gpiovdata gpiovdir gpiovfr1 gpiovfr2 general-purpose output * 1 0 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 output output output output output output output output nandc setting function data value input/output select function select 1 function select 2 gpiovdata gpiovdir gpiovfr1 gpiovfr2 nand * * 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 ? ndrb ndce1n ndce0n ndcle ndale ndwen ndren lcdcsetting function data value input/output select function select 1 function select 2 gpiovdata gpiovdir gpiovfr1 gpiovfr2 lcdc * * 0 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 ld15 ld14 ld13 ld12 ld11 ld10 ld9 ld8 tmpa901cm tmpa901cm-160 2010-07-29 1. gpiovdata (port v data register) bit bit symbol type reset valve bit mask description [31:8] ? ? undefined ? read as undefined. write as zero. [7:0] pv[7:0] r/w 0xff bm7:0 port v data register [description] a. tmpa901cm tmpa901cm-161 2010-07-29 3. gpiovfr1 (port v function register1) bit bit symbol type reset value description [31:7] ? ? undefined read as undefined. write as zero. [6:0] pv6f1 to pv0f1 r/w 0y0000000 port v function register 1 [description] a. tmpa901cm tmpa901cm-162 2010-07-29 3.9.3 notes ? procedure for using the interrupt function interrupts can be detected in various modes depending on the sensitivity setting. the following procedure should be observed when the interrupt function is enabled (gpioxie = 1) or the interrupt mode settings are modified by gpioxdir, gpioxis, gpioxibe, gpioxiev. 1. disable interrupts in a relevant bit of the gpiondir register (gpiondir = 0). 2. disable interrupts in a relevant bit of the gpioxie register (gpioxie = 0). 3. set a relevant bit of the interrupt mode setting registers (gpioxis, gpioxibe and gpioxiev). 4. clear the interrupt in a relevant bit of the gpioxic register (gpioxic = 1). 5. enable interrupts in a relevant bit of the gpioxie register (gpioxie = 1). tmpa901cm tmpa901cm-163 2010-07-29 3.10 mpmc this lsi contains two types of memory controller with different specifications. depending on the connected external memory, one of two types of controllers (mpmc0/mpmc1) can be selected by setting the external pin selmemc (port sn0). by setting the external pin seldvccm (port sn1) and the internal pmcdrv register, the power supply voltage of memory interface dvccm ca n be selected to corres pond to 1.8 v or 3.3 v. in the case of using sdram, special settings for special pins and registers are required. required settings are shown in the table below. table 3.10.1 memory controller and voltage configurations supply voltage for external memory memory controller configuration 1.8 v 0.1 v 3.3 v 0.3 v selmemc (note1) 0 input seldvccm (note1) 0 input 1 input pin configuration dmcclkin 0 input mpmc0 pmcdrv tmpa901cm tmpa901cm-164 2010-07-29 the following shows differences in supported memory between mpmc0 and mpmc1. select mpmc0 or mpmc1 depending on sdram to use. mpmc0: 16-bit standard type sdr sdram 16-bit mobile type sdr sdram 16-bit nor flash (asynchronous, separate bus only) 16-bit sram (asynchronous, separate bus only) mpmc1: 16-bit lvcmos type ddr sdram 16-bit nor flash (asynchronous, separate bus only) 16-bit sram (asynchronous, separate bus only) note 1: sdr sdram and ddr sdram cannot be used concurrently. note 2: the two memory controllers cannot be used by dy namically switching between them. the memory controller to be used must be fixed. refer to chapters on resp ective circuits for details. the following shows the mpmc block diagram. mode setting pin selmemc operation mode 0 use mpmc0 1 use mpmc1 dmc lvcmos type ddr sdram controlle r smc static memory controller ebi selmemc selmemc mpmc1 mpmc0 mpmc f hclk smc static memory controller dmc standard/mobile type sdr sdram controller external bus interface tmpa901cm tmpa901cm-165 2010-07-29 according to the voltage of the connected external memory, set pin and register as follows. note: the two memory controllers cannot be used by dynamically switching between them. the memory controller to be used must be fixed. according to power voltage, adjust drive power of related ports. in the case of using sdram, related pin connections and the constant value setting register need be set. the following table shows the required setting. note: the pmcdrv register should be set during low-speed operation (pll = off) after reset is released. [sdr sdram] note: the dmc_user_config_3 register should be set after reset is released and before sdram is initialized. this also applies after hot_reset by the pmc is released. [ddr sdram] note: the dmc_user_config_5 register s hould be set after reset is released and before sdram is initialized. this also applies after hot_reset by the pmc is released. mode setting pin seldvccm operation mode 0 control pin of external memory except nand flash operate in the dvccm = 1.8 0.1 v. 1 control pin of external memory operate in the dvccm = 3.3 0.3 v. port drive power set register pmcdrv tmpa901cm tmpa901cm-166 2010-07-29 3.10.1 ebi (external bus interface) memory controllers (mpmc0 and mpmc1) have a built-in smc (static memory controller) circuit and dmc (dynamic memory controller) circuit. the external bus of smc is used also as the external bus of dmc in the tmpa901cm. however, smc and dmc function as independent circuits in memory controller. dmc and smc circuits are controlled by ebi (external bus interface). ebi external bus interface arm926ej-s (bus master1&2) instruction cache 16kbyte bus interface data cache 16kbyte dma controller (bus master5&6) lcd data process accelerator (bus master4) lcd controller (bus master3) usb device controller (bus master7) internal ram0 16kb internal ram1 8kb internal ram2 8kb(remap) boot rom 16kb dma1 dma2 multi layer bus matrix0 mpmc0 multi layer bus matrix2 multi layer bus matrix2 lcdc lcdda lcdc dma2 dma1 usb cpu data dma2 dma1 usb lcdda cpu inst. cpu data. cpu inst. cpu data. other peripheral circuit mpmc1 smc dmc smc dmc bus swicther sdram memory norf memory selmemc timeout counter usb host 1.1 controller tmpa901cm tmpa901cm-167 2010-07-29 ebi shifts the bus according to the access reques t from memory controller (dmc and smc). if two access requests of dmc and smc are generated, ebi keeps the one access request wait, when the other is accessing. to avoid the one access request is made to wait for a long time when one access request is generated continuously, ebi manage the overlapped time, also it has a ?timeout counter?; the bus is released forcibly. in the tmpa901cm, the higher the access speed and the frequency become, the higher the priority of the dmc becomes.. therefore, it has function to prioritize dmc request by setting timeout cycle of smc side to register. table 3.10.2 ? timeout for ebi dmc time out cycle smc time out cycle 1024 clocks (fixed) to 1024 clocks (configurable with register) smc timeout cycle setting register register name address (base+) type reset value description smc_timeout 0x0050 r/w 0x000000ff smc timeout register note: ?0x00000000? cannot be set. ?0x00000001 to 0x000000ff? only is effective. the smc_timeout cycle is controlled by a 10 bit counter, however, the effective bits in control register are low-order 8bits only. the most significant bit (bit 7) of effective bits controls high-order 3bits of the 10 bit counter. note: to avoid an underflow in lcdc when setting dmc memory (sdram) to vram of lcdc,it is recommended to set this register to 0y01.please use this function toget her with the qos function (refer to ?dmc? section) bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 bit31 to bit8 smc_timeout register bit9 bit8 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 timeout counter base address = 0xf00a_0000 tmpa901cm tmpa901cm-168 2010-07-29 3.10.2 overview of mpmc0 mpmc0 contains both a dmc (dynamic memory controller) that controls sdram and smc (static memory controller) th at controls nor flash and sram. features of a dmc (dynamic memory controller): a. supports 16-bit sdr sdram b. supports 1 channel chip select c. supports clock-basis adjusting function for sdram request timing. features of an smc (static memory controller): (a) supports asynchronous, 16-bit sram and nor flash (only separate buses are supported, and multiplex buses are not supported) (b) supports 2 channels chip select (c) cycle timings and memory data bus widths can be programmed for each chip select tmpa901cm tmpa901cm-169 2010-07-29 3.10.3 functions of mpmc0 figure 3.10.1 is a simplified block diagram of mpmc0 circuits. figure 3.10.1 mpmc0 block diagram (a) bus matrix 1. bus matrix of ahb0, ahb1, ahb2 and ahb3 supports round-robin arbitration scheme. the following diagram shows the priority of bus requests. ahb0 interface m cpu data ahb3 interface m ahb2 interface m ahb1 interface m s dmc smc ahb to apb bridge m s s s m m s s s apb s apb s m cpu inst lcdc lcdda usb dmac1 dmac2 ahb sdr 1chip sram/nor 2chips mpmc0 round-robin multi layer bus matrix3 bus matrix cpu inst (ahb0) bus request cpu data (ahb1) bus request lcdc (ahb2) bus request a hb3 bus request (bus request from the bus matrix 3 output of lcdda, usb, dmac1, and dmac2) ? ? ? ? ? a dotted line is the point of handling end where bus is released. handling priority : ????? ahb0 handling ahb1 handling ahb2 handling ahb0 handling ahb3 handling tmpa901cm tmpa901cm-170 2010-07-29 2. bus matrix 2 of lcdda, dmac1, dmac2 and usb handles the earliest bus request first. if multiple bus requests are accepted simultaneously, they are prioritized as shown below. lcdda > usb > dmac1 > dmac2 following diagram show the priority of bus request. (b) clock variety control clock is controlled in pllcg circuit. 1. dynamic memory clock: use hclk clock 2. static memory clock: use hclk or 1/2 hclk (set clkcr5 tmpa901cm tmpa901cm-171 2010-07-29 3.10.3.1 dmc (dynamic memory controller) (1) dm c funct ion outline table 3.10.3 shows features of dmc. t able 3.10.3 features of dmc features support memory sdr sdram support separate bus only data bus width 16 bit data bus width access areas max 512mb access area chip select: dmccsn only timing adjustment adjustable ac timing by register command mode register setting, auto refresh, self refresh, active, precharge, read/write command, powerdown etc. clock dmcsclk frequency f hclk fixed to gnd (input clock pin dmcclkin can not be used) external control pin d15 to d0, a23 to a0, dmcsdqm1, dmcsdqm0, dmccsn, dmcwen, dmcrasn, dmccasn, dmcba0, dmcba1, dmccke, dmcsclk, dmcdclkn, dmcap tmpa901cm tmpa901cm-172 2010-07-29 (2) dmc block diagram figure 3.10.2 is a dmc block diagram. figure 3.10.2 dmc block diagram (a) arbiter the arbiter receives access commands from the dmc i/f and the memory manager, and after access arbitration, it passes the highest priority command to the memory i/f. data is read from the memory i/f to the dmc i/f. (b) memory manager the memory manager monitors and controls status of dmc block. dmc i/f memory manager arbiter memory i/f pad i/f apb slave i/f external memory i/f ebi i/f apb i/f ahb domain apb domain memory domain tmpa901cm tmpa901cm-173 2010-07-29 (3) dmc function operation (a) arbiter operation 1. read/write access arbitration 2. for read accesses, qos (quality of service) is provided. 3. hazard processing when selfsame stand-alone bus master access to an external memory, the actual access procedure to memory is executed in the instruction order. however, if multiple bus master access to an external memory, the read and write data will be stored temporary into independent buffer and be executing by priority circuit. therefore, the read and the write instruction may switch execution sequence. so please coordinate a variety of sequences, e.g. making an enough time for next instruction, checking whether or not previous execution is finished, the common-use memory data us es the internal memory and so on. 4. monitoring the state machine and select an entry of the proper pipeline. (b) memory manager operation 1. monitor and control dmc circuit 2. issuing direct commands ? nop ? prechargeall ? autorefresh ? modereg ? extended modereg 3. auto refresh function is provided set auto refresh timing by 15bit counter (c) memory interface operation according to use, there are three kinds of built-in fifos 1. command fifo: 2 words 2. read data fifo: 10 words 3. write data fifo: 10 words * as the fifo sizes of either read or write fifo is 10 words, the max size for one transfer is 8 words. (1word = 32 bit data) ? (d) low_power function dmc provide 2 kinds of low_power modes. 1. by setting dmc_memc_cmd_3 register, self refresh mode is available. 2. by setting dmc_memory_cfg_3 register, either of the two modes is available: clock suspend mode to stop memory clock (dmcclk) or power down mode to make the cke pin (cke = low) invalid automatically when there is no memory access. note: clock suspend mode function and power down mode cannot be used concurrently. tmpa901cm tmpa901cm-174 2010-07-29 (e) qos function the qos function is available in read-accessing only. the qos function is the service function for exception handling at round-robin which is controlled by bus matrix for mpmc. this function is available in read-accessing only. dmc_id_x_cfg_3 tmpa901cm tmpa901cm-175 2010-07-29 table 3.10.4 sdr memory setup example register address write data description 0x0014 0x00000006 set cas_latency to 3 0x0018 0x00000000 set t_dqss to 0 0x001c 0x00000002 set t_mrd to 2 0x0020 0x00000007 set t_ras to 7 0x0024 0x0000000b set t_rc to 11 0x0028 0x00000015 set t_rcd to 5 and schedule_rcd to 2 0x002c 0x000001f2 set t_rfc to 18 and schedule_rfc to 15 0x0030 0x00000015 set t_rp to 5 and schedule_rp to 2 0x0034 0x00000002 set t_rrd to 2 0x0038 0x00000003 set t_wr to 3 0x003c 0x00000002 set t_wtr to 2 0x0040 0x00000001 set t_xp to 1 0x0044 0x0000000a set t_xsr to 10 0x0048 0x00000014 set t_esr to 20 0x000c 0x00010020 set memory configuration 0x0010 0x00000a60 set auto refresh peri od to be every 2656 dmcsclk periods 0x0200 0x000000ff set chip select for chip 0 to be 0x00xxxxxx, rbc configuration 0x0008 0x000c0000 carry out chip 0 nop command 0x0008 0x00000000 carry out chip 0 prechargeall command 0x0008 0x00040000 carry out chip 0 autorefresh command 0x0008 0x00040000 carry out chip 0 autorefresh command 0x0008 0x00080032 carry out chip 0 mode reg command 0x32 mapped to low add bits 0x0004 0x00000000 change dmc state to ready base address = 0xf430_0000 tmpa901cm tmpa901cm-176 2010-07-29 (4) dmc register description of mpmc0 table 3.10.5 dmc sfr list of mpmc0 register name address (base +) type reset value description dmc_memc_status_3 0x0000 ro 0x00000380 dmc memory controller status register dmc_memc_cmd_3 0x0004 wo ? dmc memory controller command register dmc_direct_cmd_3 0x0008 wo ? dmc direct command register dmc_memory_cfg_3 0x000c r/w 0x00010020 dmc memory configuration register dmc_refresh_prd_3 0x0010 r/w 0x00000a60 dmc refresh period register dmc_cas_latency_3 0x0014 r/w 0x00000006 dmc cas latency register dmc_t_dqss_3 0x0018 r/w 0x00000001 dmc t_dqss register dmc_t_mrd_3 0x001c r/w 0x00000002 dmc t_mrd register dmc_t_ras_3 0x0020 r/w 0x00000007 dmc t_ras register dmc_t_rc_3 0x0024 r/w 0x0000000b dmc t_rc register dmc_t_rcd_3 0x0028 r/w 0x0000001d dmc t_rcd register dmc_t_rfc_3 0x002c r/w 0x00000212 dmc t_rfc register dmc_t_rp_3 0x0030 r/w 0x0000001d dmc t_rp register dmc_t_rrd_3 0x0034 r/w 0x00000002 dmc t_rrd register dmc_t_wr_3 0x0038 r/w 0x00000003 dmc t_wr register dmc_t_wtr_3 0x003c r/w 0x00000002 dmc t_wtr register dmc_t_xp_3 0x0040 r/w 0x00000001 dmc t_xp register dmc_t_xsr_3 0x0044 r/w 0x0000000a dmc t_xsr register dmc_t_esr_3 0x0048 r/w 0x00000014 dmc t_esr register dmc_id_0_cfg_3 dmc_id_1_cfg_3 dmc_id_2_cfg_3 dmc_id_3_cfg_3 0x0100 0x0104 0x0108 0x010c r/w 0x00000000 dmc id_<0-3>_cfg registers dmc_chip_0_cfg_3 0x0200 r/w 0x0000ff00 dmc chip_0_cfg registers reserved 0x0204 ? undefined read as undefined. write as zero. reserved 0x0208 ? undefined read as undefined. write as zero. reserved 0x020c ? undefined read as undefined. write as zero. reserved 0x0300 ? undefined read as undefined. write as zero. dmc_user_config_3 0x0304 wo undef ined dmc user_config register reserved 0x0e00 ? undefined read as undefined. write as zero. reserved 0x0e04 ? undefined read as undefined. write as zero. reserved 0x0e08 ? undefined read as undefined. write as zero. reserved 0x0fe0-0x0fec ? undefined read as undefined. write as zero. reserved 0x0ff0-0x0ffc ?- undefined read as undefined. write as zero. note: the apb supports only single-word 32-bit accesses. read from or write to registers at single-word 32-bit mode. base address = 0xf430_0000 tmpa901cm tmpa901cm-177 2010-07-29 mpmc0 the status of register read/write access (dmc_memc_status_3 status) :permitted ? :prohibited read write dmc_memc_status_3 dmc_memc_status_3 register name type config ready paused low_power config ready paused low_power dmc_memc_status_3 ro ? ? ? ? dmc_memc_cmd_3 wo ? ? ? ? dmc_direct_cmd_3 wo ? ? ? ? dmc_memory_cfg_3 r/w dmc_refresh_prd_3 r/w dmc_cas_latency_3 r/w dmc_t_dqss_3 r/w dmc_t_mrd_3 r/w dmc_t_ras_3 r/w dmc_t_rc_3 r/w dmc_t_rcd_3 r/w dmc_t_rfc_3 r/w dmc_t_rp_3 r/w dmc_t_rrd_3 r/w dmc_t_wr_3 r/w dmc_t_wtr_3 r/w dmc_t_xp_3 r/w dmc_t_xsr_3 r/w dmc_t_esr_3 r/w dmc_id_0_cfg_3 dmc_id_1_cfg_3 dmc_id_2_cfg_3 dmc_id_3_cfg_3 r/w dmc_chip_0_cfg_3 r/w dmc_user_config_3 wo ? ? ? ? tmpa901cm tmpa901cm-178 2010-07-29 1. dmc_memc_status_3 (dmc memory controller status register) bit bit symbol type reset value description [31:10] ? ? undefined read as undefined. [9] memory_banks ro 0y1 setting value of the maximum number of banks that the dmc supports: (fixed to 4 banks) [8:7] reserved ? undefined read as undefined. [6:4] memory_ddr ro 0y000 types of sdram that the dmc supports: 0y000 = sdr sdram 0y001 = reserved 0y011 = reserved 0y010 = reserved 0y1xx = reserved [3:2] memory_width ro 0y01 external memory bus width: 0y00 = 16-bit 0y01 = reserved 0y10 = reserved 0y11 = reserved [1:0] memc_status ro 0y00 memory controller status: 0y00 = config 0y01 = ready 0y10 = paused 0y11 = low-power [description] a. tmpa901cm tmpa901cm-179 2010-07-29 2. dmc_memc_cmd_3 (dmc memory controller command register) bit bit symbol type reset value description [31:3] ? ? undefined read as undefined. write as zero. [2:0] memc_cmd wo ? change the memory controller status: 0y000 = go 0y001 = sleep 0y010 = wakeup 0y011 = pause 0y100 = configure [description] a. tmpa901cm tmpa901cm-180 2010-07-29 when the dmc state is shifted from pause to low power by a sleep command, after all bank precharge is executed, cke will be driven ?l? and the sdram will automatically enter the self-refresh state. when the dmc state is shifted from low power to pause by a wakeup command, a self-refresh exit command will be issued. the sdram then automatically exists the self-refresh state and enters the idle state. note: the sdram can be shifted from active to idle by either of the following two settings: dmc_direct_cmd_3< memory_cmd>0y00 = prechargeall or 0y01 = autorefresh ? tmpa901cm tmpa901cm-181 2010-07-29 3. dmc_direct_cmd_3 (dmc direct command register) this register sets each comma nd for external memory and ex ternal memory mode register. this register sets the initial setting of external memory. bit bit symbol type reset value description [31:22] ? ? undefined read as undefined. write as zero. [21:20] chip_nmbr wo ? always write 0y00. [19:18] memory_cmd wo ? determines the command required: 0y00 = prechargeall 0y01 = autorefresh 0y10 = modereg or extended modereg 0y11 = nop [17:16] bank_addr wo ? bits mapped to external memory bank address bits when command is modereg access. 0y00 = bank0 0y01 = bank1 0y10 = bank2 0y11 = bank3 [15:14] ? ? undefined read as undefined. write as zero. [13:0] addr_13_to_0 wo ? bits mapped to external memory address bits [13:0] when command is modereg access. a. tmpa901cm tmpa901cm-182 2010-07-29 4. dmc_memory_cfg_3 (dmc memo ry configuration register) bit bit symbol type reset value description [31:23] ? ? undefined read as undefined. write as zero. [22:21] active_chips r/w 0y00 always write 0y00 [20:18] ? ? undefined read as undefined. write as zero. [17:15] memory_burst r/w 0y010 set the read/write access burst length for the sdram 0y000 = burst 1 0y001 = burst 2 0y010 = burst 4 0y011 = burst 8 0y100 = burst 16 (note) other = reserved [14] stop_mem_clock r/w 0y0 memory clock stop: 0y0 = disable 0y1 = enable [13] auto_power_down r/w 0y0 sdram auto power down enable: 0y0 = disable 0y1 = enable [12:7] power_down_prd r/w 0y000000 number of sdram automatic power-down memory clocks: (min. value = 1) 0y000001 to 0y111111 [6] ap_bit r/w 0y0 the position of the auto-precharge bit in the memory address: 0y0 = address bit 10 0y1 = address bit 8 [5:3] row_bits r/w 0y100 the number of row address bits: 0y000 = 11 bits 0y001 = 12 bits 0y010 = 13 bits 0y011 = 14 bits 0y100 = 15 bits 0y101 = 16 bits other = reserved [2:0] column_bits r/w 0y000 the number of column address bits: 0y000 = 8 bits 0y001 = 9 bits 0y010 = 10 bits 0y011 = 11 bits 0y100 = 12 bits other = reserved [description] a. tmpa901cm tmpa901cm-183 2010-07-29 b. tmpa901cm tmpa901cm-184 2010-07-29 5. dmc_refresh_prd_3 (dmc refresh period register) bit bit symbol type reset value description [31:15] ? ? undefined read as undefined. write as zero. [14:0] refresh_prd r/w 0x0a60 auto-refr esh cycle (number of memory clocks): 0x0000 to 0x7fff [description] a. tmpa901cm tmpa901cm-185 2010-07-29 6. dmc_cas_latency_3 (dmc cas latency register) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. write as zero. [3:1] cas_latency r/w 0y011 cas latency setting (number of memory clocks): 0y000 to 0y111 [0] ? ? undefined read as undefined. write as zero. [description] a. tmpa901cm tmpa901cm-186 2010-07-29 7. dmc_t_dqss_3 (dmc t_dqss register) bit bit symbol type reset value description [31:2] ? ? undefined read as undefined. write as zero. [1:0] t_dqss r/w 0y01 dqs setting (number of memory clocks) in the initial state (before operation), fix to 0y00 [description] * the dqs signal is not available in mpmc0. tmpa901cm tmpa901cm-187 2010-07-29 8. dmc_t_mrd_3 (dmc t_mrd register) bit bit symbol type reset value description [31:7] ? ? undefined read as undefined. write as zero. [6:0] t_mrd r/w 0y0000010 mode register command time (number of memory clocks): 0x00 to 0x7f [description] a. tmpa901cm tmpa901cm-188 2010-07-29 9. dmc_t_ras_3 (dmc t_ras register) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. write as zero. [3:0] t_ras r/w 0x7 time between ras and precharge (number of memory clocks): 0x0 to 0xf [description] a. tmpa901cm tmpa901cm-189 2010-07-29 10. dmc_t_rc_3 (dmc t_rc register) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. write as zero. [3:0] t_rc r/w 0y1011 delay between active bank a and next active bank a(number of memory clocks) 0x0 to 0xf [description] a. tmpa901cm tmpa901cm-190 2010-07-29 11. dmc_t_rcd_3 (dmc t_rcd register) bit bit symbol type reset value description [31:6] ? ? undefined read as undefined. write as zero. [5:3] schedule_rcd r/w 0y011 set min delay from ras to cas. set to (t_rcd setting value -3) [2:0] t_rcd r/w 0y101 set min delay from ras to cas. (number of memory clocks): 0y000 to 0y111 [description] a. tmpa901cm tmpa901cm-191 2010-07-29 12. dmc_t_rfc_3 (dmc t_rfc register) bit bit symbol type reset value description [31:10] ? ? undefined read as undefined. write as zero. [9:5] schedule_rfc r/w 0y10000 autorefresh command time setting set to (t_rfc setting value -3) [4:0] t_rfc r/w 0y10010 autorefresh command time setting (number of memory clocks) 0y00000 to 0y11111 [description] a. tmpa901cm tmpa901cm-192 2010-07-29 13. dmc _t_rp_3 (dmc t_rp register) bit bit symbol type reset value description [31:6] ? ? undefined read as undefined. write as zero. [5:3] schedule_rp r/w 0y011 precharge delay setting to ras. set to (t_rp setting value -3). [2:0] t_rp r/w 0y101 set the time from precharge to ras (number of memory clocks): 0y000 to 0y111 [description] a. tmpa901cm tmpa901cm-193 2010-07-29 14. dmc_t_rrd_3 (dmc t_rrd register) bit bit symbol type reset value description [31:4] ? ? undefined read as undefined. write as zero. [3:0] t_rrd r/w 0y0010 delay time from ac tive bank a to active bank b (number of memory clocks): 0x0 to 0xf [description] a. tmpa901cm tmpa901cm-194 2010-07-29 15. dmc_t_wr_3 (dmc t_wr register) bit bit symbol type reset value description [31:3] ? ? undefined read as undefined. write as zero. [2:0] t_wr r/w 0y011 delay from the last write data to precharge (number of memory clocks): 0y000 to 0y111 [description] a. tmpa901cm tmpa901cm-195 2010-07-29 16. dmc_t_wtr_3 (dmc t_wtr register) bit bit symbol type reset value description [31:3] ? ? undefined read as undefined. write as zero. [2:0] t_wtr r/w 0y010 setting value from the last write data to read command (memory clocks) 0y000 to 0y111 [description] a. tmpa901cm tmpa901cm-196 2010-07-29 17. dmc _t_xp_3 (dmc t_xp register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:0] t_xp r/w 0x01 set the exit power-down command time (number of memory clocks) 0x00 to 0xff [description] a. tmpa901cm tmpa901cm-197 2010-07-29 18. dmc_ t_xsr_3 (dmc t_xsr register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:0] t_xsr r/w 0x0a time from self-refresh exit command to other command (memory clocks) 0x00 to 0xff [description] a. tmpa901cm tmpa901cm-198 2010-07-29 19. dmc_t_esr_3 (dmc t_esr register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7:0] t_esr r/w 0x14 the minimum time from self-refresh entry to exit: ? (memory clocks) 0x00 to 0xff note: self-refersh exit have to use wakeup direct command ,this register is only to set the the minimum time from self-refresh entry to exit [description] a. tmpa901cm tmpa901cm-199 2010-07-29 20. dmc_id_<0-3>_cfg_3 registers bit bit symbol type reset value description [31:10] ? ? undefined read as undefined. write as zero. [9:2] qos_max r/w 0x00 maximum qos: 0x00 0xff [1] qos_min r/w 0y0 minimum qos selection: 0y0 = qos max mode 0y1 = qos min mode [0] qos_enable r/w 0y0 enable qos 0y0 = disable 0y1 = enable [description] qos setting register list register address correspond to ahb dmc_id_0_cfg_3 (0xf430_0000) + (0x0100) ahb0 : cpu data dmc_id_1_cfg_3 (0xf430_0000) + (0x0104) ahb1 : cpu inst dmc_id_2_cfg_3 (0xf430_0000) + (0x0108) ahb2 : lcdc dmc_id_3_cfg_3 (0xf430_0000) + (0x010c) ahb3 : multilayer bus matrix2 (lcdda,usb,dmac1,dmac2) a. tmpa901cm tmpa901cm-200 2010-07-29 21. dmc_chip_0_cfg_3 (dmc chip_0_cfg registers) bit bit symbol type reset value description [31:17] ? ? undefined read as undefined. write as zero. [16] brc_n_rbc r/w 0y0 sdram address structure: 0y0 = row, bank, column 0y1 = bank, row, column [15:8] address_match r/w 0xff set the start address [31:24]: 0x00 to 0xff [7:0] address_mask r/w 0x00 set the mask value of the start address [31:24]: the bit for the value 1 is a bit for address comparison 0x00 to 0xff [description] a. tmpa901cm tmpa901cm-201 2010-07-29 22. dmc_user_config_3 (dmc user_config register) bit bit symbol type reset value description [31:8] ? ? undefined read as undefined. write as zero. [7] reserved ? undefined read as undefined. write as zero. [6:4] dmclk_out1 wo 0y000 sdr sdram constant value setting: must fix to 0y000 [3:1] reserved ? undefined read as undefined. write as zero. [0] sdr_width wo 0y0 set the memory data bus width of corresponding external sdr memory: 0y0: 16-bit 0y1: reserved [description] a. tmpa901cm tmpa901cm-202 2010-07-29 3.10.3.2 smc (static memroy controller) this device c o ntains smc (sta tic memory controller) that co ntrols the external memory (nor flash memory, mask rom sram and etc.). (1) smc function outline table 3.10.6 shows features of smc. t able 3.10.6 features of smc features support memory external asynchronous static memory (nor flash memory and sram, etc.) support separate bus only data bus width 16bit data bus width access areas 2 areas supported by chip select. max acceess area: smccs0n: 512 mb smccs1n: 512 mb adjustable ac timing by register timing adjustment support external wait request (only in synchronous mode) clock selectable clock for external pin (f hclk or f hclk /2) by the clock controller register clkcr5 tmpa901cm tmpa901cm-203 2010-07-29 (2) smc block diagram figure 3.10.17 is a smc block diagram. figure 3.10.1 7 smc blo ck diagram (a) arbiter the arbiter receives accesses from the smc i/f and memory manager. read/write requests are arbitrated on a round-robin basis. requests from the manager have the highest priority. (b) memory manager updates timing registers and cont rols commands issued to memory smc i/f memory manager arbiter memory i/f pad i/f apb slave i/f sram memory i/f ebi i/f ahb domain memory domain tmpa901cm tmpa901cm-204 2010-07-29 (3) smc function (a) apb slave i/f the apb slave i/f adds a wait state for all reads and writes more than one wait state is ge nerated in the following case: outstanding direct commands a memory command is received, but the previous memory command has not been completed. (b) format 1. hazard processing when selfsame stand-alone bus master access to an external memory, the actual access procedure to memory is executed in the instruction order. however, if multiple bus master access to an external memory, the read and write data will be stored temporary into independent buffer and be executing by priority circuit. therefore, the read and the write instruction may switch execution sequence. so please coordinate a variety of sequences, e.g. making an enough time for next instruction, checking whether or not previous execution is finished, the common-use memory data us es the internal memory and so on. 2. access to the sram memory ? standard sram access ? memory address shifting ? memory burst alignment the burst align settings are necessary in order to support asynchronous page mode memory. refer to smc register of mpmc, smc_set_opmode_3 (smc set opmode re gist er). note: in case of not having any page mode methods, e.g. nor flash, it is unnecessary to set burst align. memory burst length: supported memory burst transfer length is 4 beats. (c) memory manager operation the memory manager controls the smc state and manages update of chip configuration registers. (d) memory i/f operation the memory i/f issues commands and controls their timings. tmpa901cm tmpa901cm-205 2010-07-29 table 3.10.7 static memory setup example register address write data description 0x0014 0x00029266 smc_set_cycles_3 0x0018 0x00000809 smc_set_opmode_3 0x0010 0x00400000 smc_direct_cmd_3 base address = 0xf430_1000 tmpa901cm tmpa901cm-206 2010-07-29 (4) smc registers for mpmc0 table 3.10.8 mpmc0 smc sfr list base address = 0xf430_1000 register name address (base+) type reset value description reserved 0x0000 ? undefined read as undefined. write as zero. reserved 0x0004 ? undefined read as undefined. write as zero. reserved 0x0008 ? ? write prohibited reserved 0x000c ? ? write prohibited smc_direct_cmd_3 0x0010 wo ? smc direct command register smc_set_cycles_3 0x0014 wo ? smc set cycles register smc_set_opmode_3 0x0018 wo ? smc set opmode register reserved 0x0020 ? undefined read as undefined. write as zero. smc_sram_cycles0_0_3 0x0100 smc_sram_cycles0_1_3 0x0120 ro 0x0002b3cc smc sram cycles registers <0-1> reserved 0x0140 ro undefined read as undefined. reserved 0x0160 ro undefined read as undefined. smc_opmode0_0_3 0x0104 0x20e00802 smc_opmode0_1_3 0x0124 ro 0x60e00802 smc opmode registers <0-1> reserved 0x0144 ro undefined read as undefined. reserved 0x0164 ro undefined read as undefined. reserved 0x0200 ? undefined read as undefined. write as zero. reserved 0x0204 ? undefined read as undefined. write as zero. reserved 0x0e00 ? undefined read as undefined. write as zero. reserved 0x0e04 ? undefined read as undefined. write as zero. reserved 0x0e08 ? undefined read as undefined. write as zero. reserved 0x0fe0-0x0fec ? undefined read as undefined. write as zero. reserved 0x0ff0-0x0ffc ? undefined read as undefined. write as zero. note: the apb supports only single-word 32-bit accesses. read from or write to registers at single-word 32-bit mode. tmpa901cm tmpa901cm-207 2010-07-29 1. smc_direct_cmd_3 (smc direct command register) bit bit symbol type reset value description [31:26] ? ? undefined read as undefined. write as zero. [25:23] chip_select wo ? cs selection: 0y000 = cs0 0y001 = cs1 0y010 to 0y111 = reserved [22:21] cmd_type wo ? current command: 0y00 = reserved 0y01 = reserved 0y10 = updateregs 0y11 = reserved [20:0] ? ? undefined reserved [description] a. tmpa901cm tmpa901cm-208 2010-07-29 start set smc_set_cycle register as timing parameter and set smc_set_opmode as operation mode select the external chipselect and set smc_direct_cmd register then updating end tmpa901cm tmpa901cm-209 2010-07-29 2. smc_set_cycles_3 (smc set cycles register) bit bit symbol type reset value description [31:23] ? ? undefined read as undefined. write as zero. [22:20] reserved ? undefined read as undefined. write as zero. [19:17] set_t5 wo ? set value of t tr (holding register) 0y000 to 0y111 [16:14] set_t4 wo ? set value of t pc (holding register) 0y000 to 0y111 [13:11] set_t3 wo ? set value of t wp (holding register) 0y000 to 0y111 [10:8] set_t2 wo ? set value of t ceoe (holding register) 0y000 to 0y111 [7:4] set_t1 wo ? set value of t wc (holding register) 0y0000 to 0y1111 [3:0] set_t0 wo ? set value of t rc (holding register) 0y0000 to 0y1111 this register is provided to adjust the access cycle of static memory and should be set to satisfy the a.c. specifications of the memory to be used, the access cycle is determined to satisfy the settings of both this register and the external wait signal. note that the external wait signal is only effective in synchronous mode. it cannot be used in asynchronous mode. this is a holding register for enabling setting values. by executing of the following operations, the settings values of this regi ster will be updated to the configuration register of the memory manager and enabled. ? the smc_direct_cmd register indicates only a register update is taking place. [description] a. tmpa901cm tmpa901cm-210 2010-07-29 e. tmpa901cm tmpa901cm-211 2010-07-29 setting example: smc set cycles register = 0x0002934c register setting value ttr tpc twp tceoe twc trc 0x0002934c 2 4 don?t care smcclk (internal clock) smccs0n smcoen smcwen a[23:0] d[31:0] be[0:3]n figure 3.10.19 asynchronous write setting example: smc set cycles register = 0x000272c3 register setting value t tr t pc t wp t ceoe t wc t rc 0x000272c3 1 2 3 don?t care smcclk (internal clock) smccs0n smcoen smcwen a[23:0] d[31:0] figure 3.10.20 asynchronous page read a d t r c t ceoe t pc t pc t pc a+1 a+2 a+3 d+1 d+2 d+3 xxxx addr data t w c t wp xxxx xxxx tmpa901cm tmpa901cm-212 2010-07-29 setting example: smc set cycles register = 0x00029143 register setting value t tr t pc t wp t ceoe t wc t rc 0x00029143 1 2 1 4 3 don?t care smcclk (internal clock) smccs0n smcoen smcwen a[23:0] d[31:0] figure 3.10.21 asynchronous write after asynchronous read addr1 d1 addr2 d2 t tr xxxx xxxx tmpa901cm tmpa901cm-213 2010-07-29 3. smc_set_opmode_3 (smc set opmode register) bit bit symbol type reset value description [31:16] ? ? undefined read as undefined. write as zero. [15:13] set_burst_align wo ? memory burst boundary split setting: (holding register) 0y000 = bursts can cross any address boundary 0y001 = split at the 32-beat burst boundary 0y010 = split at the 64-beat burst boundary 0y011 = split at the 128-beat burst boundary 0y100 = split at the 256-beat burst boundary other = reserved [12] set_bls wo ? byte enable (smcbe0-3)bls timing setting: 0y0 = smccsn timing 0y1 = smcwen timing [11] reserved wo ? write as zero. [10] - ? undefined read as undefined. write as zero. [9:7] set_wr_bl wo ? write burst length 0y000 = 1 beat 0y001 = 4 beats other = reserved [6] set_wr_sync wo ? write synchronization mode setting 0y0 = asynchronous write mode 0y1 = reserved [5:3] set_rd_bl wo ? read burst length 0y000 = 1 beat 0y001 = 4 beats other = reserved [2] set_rd_sync wo ? read synchronization mode setting: 0y0 = asynchronous read mode 0y1 = reserved [1:0] set_mw wo ? holding register of the memory data bus width set value: 0y00 = reserved 0y01 = 16 bits 0y10 = reserved 0y11 = reserved this is a holding register for enabling setting values. by executing of the following operations, the settings values of this regi ster will be updated to the configuration register of the memory manager and enabled. ? the smc_direct_cmd register takes place the updateregs. [description] a. < set_burst_align > memory burst boundary split setting: 0y000 = bursts can cross any address boundary 0y001 = split at the 32-beat burst boundary 0y010 = split at the 64-beat burst boundary 0y011 = split at the 128-beat burst boundary 0y100 = split at the 256-beat burst boundary other = reserved address = (0xf430_1000) + (0x0018) tmpa901cm tmpa901cm-214 2010-07-29 b. < set_bls > byte enable (smcbe0-3) timing setting: 0y0 = smccsn timing 0y1 = smcwen timing c. < set_wr_bl > write burst length 0y000 = 1 beat 0y001 = 4 beats other = reserved d. < set_wr_sync > write synchronization mode setting: 0y0 = asynchronous write mode 0y1 = synchronous write mode e. < set_rd_bl > read burst length 0y000 = 1 beat 0y001 = 4 beats other = reserved f. < set_rd_sync > read synchronization mode setting: 0y0 = asynchronous read mode 0y1 = synchronous read mode g. < set_mw > holding register of the memory data bus width set value: 0y00 = reserved 0y01 = 16 bits 0y10 = reserved 0y11 = reserved tmpa901cm tmpa901cm-215 2010-07-29 4. smc_sram_cycles0_0_3 (smc sr am cycles registers 0 <0>) ? ? bit bit symbol type reset value description [31:20] ? ? undefined read as undefined. [19:17] t_tr ro 0y001 turnaround time for sram chip configuration 0y000 to 0y111 [16:14] t_pc ro 0y010 page cycle time: 0y000 to 0y111 [13:11] t_wp ro 0y110 delay time for smc_we_n_0: 0y000 to 0y111 [10:8] t_ceoe ro 0y011 delay time for smc_oe_n_0: 0y000 to 0y111 [7:4] t_wc ro 0y1100 write cycle time: 0y0000 to 0y1111 [3:0] t_rc ro 0y1100 read cycle time: 0y0000 to 0y1111 [description] a. tmpa901cm tmpa901cm-216 2010-07-29 5. smc_opmode0_0_3 (smc opmode registers 0<0>) bit bit symbol type reset value description [31:24] reserved ro 0x20 read as 0x20. [23:16] reserved ro 0xe0 read as 0xe0. [15:13] burst_align ro 0y000 memory burst boundary split set value: 0y000 = bursts can cross any address boundary 0y001 = split at the 32-beat burst boundary 0y010 = split at the 64-beat burst boundary 0y011 = split at the 128-beat burst boundary 0y100 = split at the 256-beat burst boundary other = reserved [12] bls ro 0y0 bls timing : 0y0 = chip select 0y1 = reserved [11] reserved ro 0y1 ? [10] ? ? undefined read as undefined. [9:7] wr_bl ro 0y000 write memory burst length: 0y000 = 1-beat 0y001 = 4-beats other = reserved [6] wr_sync ro 0y0 memory operation mode: 0y0 = asynchronous write operation 0y1 = reserved . [5:3] rd_bl ro 0y000 read memory burst length: 0y000 = 1 beat 0y001 = 4 beats other = reserved [2] rd_sync ro 0y0 memory operation mode: 0y0 = asynchronous read operation 0y1 = reserved . [1:0] mw ro 0y10 memory data bus width : 0y00 = reserved 0y01 = 16-bits 0y10 = reserved 0y11 = reserved address = (0xf430_1000) + (0x0104) tmpa901cm tmpa901cm-217 2010-07-29 6. smc_opmode0_1_3 (smc opmode registers 0<1>) bit bit symbol type reset value description [31:24] reserved ro 0x60 read as 0x60. [23:16] reserved ro 0xe0 read as 0xe0. [15:13] burst_align ro 0y000 memory burst boundary split set value: 0y000 = bursts can cross any address boundary 0y001 = split at the 32-beat burst boundary 0y010 = split at the 64-beat burst boundary 0y011 = split at the 128-beat burst boundary 0y100 = split at the 256-beat burst boundary other = reserved [12] bls ro 0y0 bls timing : 0y0 = chip select 0y1 = reserved [11] reserved ro 0y1 ? [10] ? ? undefined read as undefined. [9:7] wr_bl ro 0y000 write memory burst length: 0y000 = 1-beat 0y001 = 4-beats other = reserved [6] wr_sync ro 0y0 memory operation mode: 0y0 = asynchronous write operation 0y1 = reserved . [5:3] rd_bl ro 0y000 read memory burst length: 0y000 = 1 beat 0y001 = 4 beats other = reserved [2] rd_sync ro 0y0 memory operation mode: 0y0 = asynchronous read operation 0y1 = reserved . [1:0] mw ro 0y10 memory data bus width : 0y00 = reserved 0y01 = 16-bits 0y10 = reserved 0y11 = reserved [description] a. tmpa901cm tmpa901cm-218 2010-07-29 b. tmpa901cm tmpa901cm-219 2010-07-29 3.10.4 overview of mpmc1 mpmc1 contains both a dmc (dynamic memory controller) that controls sdram and smc (static memory controller) th at controls nor flash and sram. features of a dmc (dynamic memory controller): a. supports 16-bit ddr sdram(only support s lvcmos type memory i/o power) b. supports 1 channel chip select signal c. supports adjusting function in each clock for sdram each timing. features of an smc (static memory controller): a. supports asynchronous, 16-bit sram and nor flash (only separate buses are supported, and multiplex buses are not supported) b. supports 2 channels chip select signals c. cycle timings and memory data bus widths can be programmed for each chip select signal tmpa901cm tmpa901cm-220 2010-07-29 3.10.5 function of mpmc 1 figure 3.10.22 is a simplified block diagram of mpmc1 circuits. figure 3.10.22 mpmc1block diagram ahb0 interface m cpu data ahb2 interface m ahb1 interface m s busmatrix dmc smc ahb to apb bridge m s s m m s s s apb s apb s m cpu inst lcdc ahb ddr 1 chip sram/nor chips round robin ahb3 interface m s mpmc1 lcdda usb multi layer bus matrix 2 ahb4 interface m ahb5 interface m dma1 dma2 tmpa901cm tmpa901cm-221 2010-07-29 (a) bus matrix 1. bus matrix of ahb0, ahb1, ahb2, ahb3, ahb4 and ahb5 supports round-robin arbitration scheme. the following diagram shows the priority of bus requests. cpu inst (ahb0) bus request cpu data (ahb1) bus request lcdc (ahb2) bus request a hb3 bus request (bus request from the bus matrix output of lcdda2, usb) ? ? ? ? ? a dotted line is the point of handling end where bus is released. priority of handling ? : ? ? ? ? ? ? ? ahb0 handling ahb1 handling ahb2 handling ahb3 handling ahb4 handling ahb5 handling ahb0 handling ? ? dmac1 (ahb4) bus request dmac2 (ahb5) bus request tmpa901cm tmpa901cm-222 2010-07-29 2. bus matrix 2 of lcdda and usb handles the earliest bus request first. if multiple bus requests are accepted simu ltaneously, they are handled according to hardware priority. hardware priority is shown following hardware priority is shown following lcdda (high) c1 usb (low) (b) clock variety control clock is controlled in pllcg circuit: 1. dynamic memory clock: use hclk clock 2. static memory clock: use hclk or 1/2 hclk lcddabus request usb bus request ? ? ? a dotted line is the point of handling end, where bus is released. handling priority ? : ? ? ? ? lcdda handling lcdda handling usb handling ? usb handling tmpa901cm tmpa901cm-223 2010-07-29 3.10.5.1 dmc (dynamic memory controller) (1) dmc block d i agram figure 3.10.23 ? dmc block diagram (a) arbiter the arbiter receives access commands from the dmc i/f and the memory manager, and after access arbitration, it passes the highest priority command to the memory i/f. data is read from the memory i/f to the dmc i/f. (b) memory manager the memory manager monitors and controls the dmc current. dmc i/f memory manager arbiter memory i/f pad i/f apb slave i/f external memory i/f ebi i/f apb i/f ahb domain apb domain memory domain tmpa901cm tmpa901cm-224 2010-07-29 (2) dmc function operation (a) arbiter operation 1. read/write access arbitration 2. for read accesses, qos (quality of service) is provided. 3. hazard processing when selfsame stand-alone bus master access to an external memory, the actual access procedure to memory is executed in the instruction order. however, if multiple bus master access to an external memory, the read and write data will be stored temporary into independent buffer and be executing by priority circuit. therefore, the read and the write instruction may switch execution sequence. so please coordinate a variety of sequences, e.g. making an enough time for next instruction, checking whether or not previous execution is finished, the common-use memory data us es the internal memory and so on. 4. monitoring the state machine and select an entry of the proper pipeline. (b) memory manager operation 1. monitor and control dmc circuit 2. issuing direct comand ? nop ? prechargeall ? autorefresh ? modereg ? extended modereg 3. auto refresh function is provided set auto refresh timing by 15bit counter. (c) memory interface operation according to use, there are three kinds of built-in fifos. 1. command fifo: 2 words 2. read data fifo:10 words 3. write data fifo:10 words ? as the fifo sizes of either read or write fifo is 10 words. for one transfer, the max size is 8 words. ? (d) low power function dmc provide 2 kinds of low power modes. 1. set dmc_memc_cmd_3 register to realize low_power (self refresh mode). 2. set dmc_memory_cfg_3 register, stop memory clock (dmcclk) or as no memory access, cke is set to invalid (cke = low). note: clock suspend mode function and powe r down mode cannot be used concurrently. tmpa901cm tmpa901cm-225 2010-07-29 (e) qos function the qos function is available in read-accessing only. the qos function is the service function for exception handling at round-robin which is controlled by bus matrix for mpmc. dmc_id_x_cfg_5 tmpa901cm tmpa901cm-226 2010-07-29 table 3.10.9 example ddr memory setup register address write data description 0x0014 0x00000004 set cas_latency to 2 0x0018 0x00000001 set t_dqss to 1 0x001c 0x00000002 sett_mrd to 2 0x0020 0x00000007 sett_ras to 7 0x0024 0x0000000b set t_rc to 11 0x0028 0x00000015 set t_rcd to 5 and schedule_rcdto 2 0x002c 0x000001f2 set t_rfc to 18 and schedule_rfcto 15 0x0030 0x00000015 set t_rp to 5 and schedule_rpto 2 0x0034 0x00000002 set t_rrd to 2 0x0038 0x00000003 set t_wrto 3 0x003c 0x00000002 set t_wtr to 2 0x0040 0x00000001 set t_xp to 1 0x0044 0x0000000a set t_xsr to 10 0x0048 0x00000014 set t_esr to 20 0x000c 0x00010009 set memory configuration 0x0010 0x00000640 set auto refresh time to be every 1600 dmcsclk periods 0x0200 0x000000ff set chip select for chip 0 to be 0x00xxxxxx, rbc configuration 0x0008 0x000c0000 carry out chip 0 nopcommand 0x0008 0x00000000 carry out chip 0 prechargeall command 0x0008 0x00090000 extended mode register setup 0x0008 0x00080122 mode register setup 0x0008 0x00000000 precharge all 0x0008 0x00040000 carry out chip 0 autorefresh command 0x0008 0x00040000 carry out chip 0 autorefresh command 0x0008 0x00080032 carry out chip 0 mode reg command 0x32 mapped to low add bits 0x0004 0x00000000 change dmc state to ready base address = 0xf431_0000 tmpa901cm tmpa901cm-227 2010-07-29 (3) mpmc1 dmc register table 3.10.10 sfr list register name address (base+) type reset value description dmc_memc_status_5 0x0000 ro 0x00000390 dmc memory controller status register dmc_memc_cmd_5 0x0004 wo ? dmc memory controller command register dmc_direct_cmd_5 0x0008 wo ? dmc direct command register dmc_memory_cfg_5 0x000c r/w 0x00010020 dmc memory configuration register dmc_refresh_prd_5 0x0010 r/w 0x00000a60 dmc refresh period register dmc_cas_latency_5 0x0014 r/w 0x00000006 dmc cas latency register dmc_t_dqss_5 0x0018 r/w 0x00000001 dmc t_dqss register dmc_t_mrd_5 0x001c r/w 0x00000002 dmc t_mrd register dmc_t_ras_5 0x0020 r/w 0x00000007 dmc t_ras register dmc_t_rc_5 0x0024 r/w 0x0000000b dmc t_rc register dmc_t_rcd_5 0x0028 r/w 0x0000001d dmc t_rcd register dmc_t_rfc_5 0x002c r/w 0x00000212 dmc t_rfc register dmc_t_rp_5 0x0030 r/w 0x0000001d dmc t_rp register dmc_t_rrd_5 0x0034 r/w 0x00000002 dmc t_rrd register dmc_t_wr_5 0x0038 r/w 0x00000003 dmc t_wr register dmc_t_wtr_5 0x003c r/w 0x00000002 dmc t_wtr register dmc_t_xp_5 0x0040 r/w 0x00000001 dmc t_xp register dmc_t_xsr_5 0x0044 r/w 0x0000000a dmc t_xsr register dmc_t_esr_5 0x0048 r/w 0x00000014 dmc t_esr register dmc_id_0_cfg_5 dmc_id_1_cfg_5 dmc_id_2_cfg_5 dmc_id_3_cfg_5 dmc_id_4_cfg_5 dmc_id_5_cfg_5 0x0100 0x0104 0x0108 0x010c 0x0110 0x0114 r/w 0x00000000 dmc id_<0-5>_cfg registers dmc_chip_0_cfg_5 0x0200 r/w 0x0000ff00 dmc chip_0_cfg registers reserved 0x0204 ? undefined read as undefined. write as zero. reserved 0x0208 ? undefined read as undefined. write as zero. reserved 0x020c ? undefined read as undefined. write as zero. reserved 0x0300 ? undefined read as undefined. write as zero. dmc_user_config_5 0x0304 wo undef ined dmc user_config register reserved 0x0e00 ? undefined read as undefined. write as zero. reserved 0x0e04 ? undefined read as undefined. write as zero. reserved 0x0e08 ? undefined read as undefined. write as zero. reserved 0x0fe0-0x0fec ? undefined read as undefined. write as zero. reserved 0x0ff0-0x0ffc ? undefined read as undefined. write as zero. note: the apb supports only single-word 32-bit accesses. read from or write to registers at single-word 32-bit mode. base address = 0xf431_0000 tmpa901cm tmpa901cm-228 2010-07-29 mpmc1 the permission status of register read/write access (dmc_memc_status_5 status) : permitted ? : prohibited read write dmc_memc_status_5 dmc_memc_status_5 register name type config ready paused low_power config ready paused low_power dmc_memc_status_5 ro ? ? ? ? dmc_memc_cmd_5 wo ? ? ? ? dmc_direct_cmd_5 wo ? ? ? ? dmc_memory_cfg_5 r/w dmc_refresh_prd_5 r/w dmc_cas_latency_5 r/w dmc_t_dqss_5 r/w dmc_t_mrd_5 r/w dmc_t_ras_5 r/w dmc_t_rc_5 r/w dmc_t_rcd_5 r/w dmc_t_rfc_5 r/w dmc_t_rp_5 r/w dmc_t_rrd_5 r/w dmc_t_wr_5 r/w dmc_t_wtr_5 r/w dmc_t_xp_5 r/w dmc_t_xsr_5 r/w dmc_t_esr_5 r/w dmc_id_0_cfg_5 dmc_id_1_cfg_5 dmc_id_2_cfg_5 dmc_id_3_cfg_5 dmc_id_4_cfg_5 dmc_id_5_cfg_5 r/w dmc_chip_0_cfg_5 r/w dmc_user_config_5 wo ? ? ? ? mpmc1 registers can?t be read/write in reset status. tmpa901cm tmpa901cm-229 2010-07-29 1. dmc_memc_status_5 (dmc memory controller status register) bit bit symbol type reset value description [31:10] ? ? undefined read as undefined. write as zero. [9] memory_banks ro 0y1 setting value of the maximum number of banks that the dmc supports: fixed to 4 banks [8:7] ? ? undefined read as undefined. [6:4] memory_ddr ro 0y001 types of sdram that the dmc supports: 0y000 = reserved 0y001 = ddr sdram 0y011 = reserved 0y010 = reserved 0y1xx = reserved [3:2] memory_width ro 0y00 external memory bus width: 0y00 = 16-bit 0y01 = reserved 0y10 = reserved 0y11 = reserved [1:0] memc_status ro 0y00 memory controller status: 0y00 = config 0y01 = ready 0y10 = paused 0y11 = low-power [description] a. tmpa901cm tmpa901cm-230 2010-07-29 2. dmc_memc_cmd_5 (dmc memory controller command register) bit bit symbol type reset value description [31:3] ? ? undefined read as undefined. write as zero. [2:0] memc_cmd wo ? change the memory controller status: 0y000 = go 0y001 = sleep 0y010 = wakeup 0y011 = pause 0y100 = configure [description] a. tmpa901cm tmpa901cm-231 2010-07-29 3. dmc_direct_cmd_5 (dmc direct command register) this register sets each command for external memory and external memory mode register. this register sets the initial setting of external memory. bit bit symbol type reset value description [31:22] ? ? undefined read as undefined. write as zero. [21:20] chip_nmbr wo ? always write 0y00 [19:18] memory_cmd wo ? determines the command required: 0y00 = prechargeall 0y01 = autorefresh 0y10 = modereg or extended modereg 0y11 = nop [17:16] bank_addr wo ? bits mapped to external memory bank address bits when command is modereg access. 0y00 = bank0 0y01 = bank1 0y10 = bank2 0y11 = bank3 [15:14] ? ? undefined read as undefined. write as zero. [13:0] addr_13_to_0 wo ? bits mapped to external memory address bits [13:0] when command is modereg access. note: use dmc_direct_cmd_5 to configure cas latency of ddr_sdram memory, the setting of cas latency(cl) is different from sdr_sdram. the cl setting value of memory controler must be 1 smaller than the cl setting value of ddr_sdram memory. examples: dmc_cas_latency_5 0x00000004 ? (set memory controller cl = 2) dmc_direct_cmd_5 0x00080033 (set ddr sdram memory cl = 3) [description] a. tmpa901cm tmpa901cm-232 2010-07-29 b. |